上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 26 下一页
import lombok.extern.slf4j.Slf4j; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * @author: small-sunshine * @Descrip Read More
posted @ 2021-06-25 14:57 活出自己范儿 Views(324) Comments(0) Diggs(0)
/** * 是否可以构成一个三角形 * 1、一边存在小于或等于0的数据不能构成三角形 * 2、有任意一个满足:两边之和小于或等于第三边的情况都不能构成三角形 * * @param a * @param b * @param c * @return boolean */ public static b Read More
posted @ 2021-06-25 10:30 活出自己范儿 Views(109) Comments(0) Diggs(0)
import java.io.*; import java.text.DecimalFormat; /** * @author: small sunshine * @Description: * @date: 2021/6/20 10:04 上午 */ public class ScoreDescS Read More
posted @ 2021-06-24 12:42 活出自己范儿 Views(86) Comments(0) Diggs(0)
/** * 冒泡排序-稳定的,两个相同的数-相对位置不变 * * @param num * @return */ public static int[] bubbleSort(int[] num) { if (Objects.isNull(num) || num.length <= 1) { ret Read More
posted @ 2021-06-23 14:00 活出自己范儿 Views(29) Comments(0) Diggs(0)
import com.alibaba.fastjson.JSON; import lombok.extern.slf4j.Slf4j; /** * @author: Small sun shine * @Description: * @date: 2021/6/20 9:40 上午 */ @Slf4 Read More
posted @ 2021-06-20 10:17 活出自己范儿 Views(33) Comments(0) Diggs(0)
//递归,累计+1,非尾递归 public static int cap(int n) { if (n == 1) { return 1; } return cap((n - 1)) + 1; } //递归,累计+1,尾递归 public static int capTail(int n, int Read More
posted @ 2021-06-19 18:35 活出自己范儿 Views(85) Comments(0) Diggs(0)
/** * 双指针-数组反转 * * @param array * @return */ public static int[] coverArray(int[] array) { if (array == null && array.length == 0) { return array; } i Read More
posted @ 2021-06-17 16:01 活出自己范儿 Views(48) Comments(0) Diggs(0)
public class StrCutDown { /** * 字符串压缩范围[a-zA-Z] 输入如:aaabbbccca =>> a3b3c3a1 * 压缩后的字符串要小于原字符串,否则返回原字符串 * @param args */ public static void main(String[ Read More
posted @ 2021-06-16 13:41 活出自己范儿 Views(279) Comments(0) Diggs(0)
@Slf4j public class AgeTotal { public static String file = "/Desktop/age.txt"; public static int total = 10000 * 10000; public static int maxAge = 180 Read More
posted @ 2021-06-15 16:54 活出自己范儿 Views(89) Comments(0) Diggs(0)
public class DoublePointer { public static int[] a = new int[]{1, 3, 4, 9}; public static int[] b = new int[]{0, 3, 4, 4}; public static void main(Str Read More
posted @ 2021-06-15 16:09 活出自己范儿 Views(346) Comments(0) Diggs(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 26 下一页