摘要:
class MaxQueue { Queue<Integer> queue; LinkedList<Integer> max; public MaxQueue() { queue = new LinkedList<>(); max = new LinkedList<>(); } public int 阅读全文
posted @ 2020-08-24 15:46
欣姐姐
阅读(96)
评论(0)
推荐(0)
摘要:
public int maxProfit(int[] prices) { int n = prices.length; if(n == 0) return 0; int[] x = new int[n]; x[0] = prices[0]; int max = -1; for(int i = 1;i 阅读全文
posted @ 2020-08-24 15:02
欣姐姐
阅读(120)
评论(0)
推荐(0)
摘要:
public int sumNums(int n) { boolean flag = n > 0 && (n+=sumNums(n-1))>0; return n; } public int sumNums(int n) { return IntStream.range(1,n+1).sum(); 阅读全文
posted @ 2020-08-24 10:09
欣姐姐
阅读(146)
评论(0)
推荐(0)

浙公网安备 33010602011771号