摘要:
45.跳跃游戏2 public int jump(int[] nums) { if(nums == null || nums.length < 1) { return 0; } int step = 0; int cur = 0; int next = nums[0]; for(int i = 1; 阅读全文
摘要:
33.搜索旋转排序数组 public int search(int[] nums, int target) { if(nums == null || nums.length == 0) { return -1; } int left = 0; int mid = 0; int right = num 阅读全文
摘要:
7.整数反转 public int reverse(int x) { boolean isFu = x < 0 ? true : false; x = isFu ? x : -x; int res = 0; int M = Integer.MIN_VALUE / 10; int N = Int 阅读全文
摘要:
1.两数之和 public int[] twoSum(int[] nums, int target) { HashMap<Integer,Integer> hm = new HashMap<>(); int res[] = new int[2]; for(int i = 0;i < nums.len 阅读全文