摘要:
https://blog.csdn.net/hejingyuan6/article/details/36203505 阅读全文
posted @ 2020-07-31 17:41
浅滩浅
阅读(57)
评论(0)
推荐(0)
摘要:
#饿汉式 public class Singleton{ public final static INSTANCE = new Singleton(); private Singleton(){ } } /*枚举类型限制对象个数,当我们只写一个就变成了单例模式 */ public enum Sing 阅读全文
posted @ 2020-07-31 17:00
浅滩浅
阅读(89)
评论(0)
推荐(0)
摘要:
##暴力题解:双重for循环,时间复杂度O(n^2) class Solution { public int max(int a,int b){ if(a>=b) return a; return b; } public int min(int a,int b){ if(a>=b) return b 阅读全文
posted @ 2020-07-31 16:14
浅滩浅
阅读(175)
评论(0)
推荐(0)
摘要:
题目链接:https://leetcode-cn.com/problems/magic-index-lcci/ 间接跳跃查找(leetcode给的测试好像都是递增的) class Solution { public int findMagicIndex(int[] nums) { for(int i 阅读全文
posted @ 2020-07-31 14:57
浅滩浅
阅读(125)
评论(0)
推荐(0)

浙公网安备 33010602011771号