摘要: 避免这个循环的重复 所以i>position && nums[i] == nums[i-1] 阅读全文
posted @ 2018-09-10 21:03 jasoncool1 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 为了避免前面选了 到后面选的时候 又选到了后面的前面 加一个position作为标记 循环从position开始 阅读全文
posted @ 2018-09-10 11:47 jasoncool1 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution { 2 public String countAndSay(int n) { 3 String str = "1"; 4 if(n == 1) return str; 5 return helper(str, n - 1); 6 7 8 } 9 ... 阅读全文
posted @ 2018-09-10 11:14 jasoncool1 阅读(117) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/valid-sudoku/discuss/15472/Short+Simple-Java-using-Strings 阅读全文
posted @ 2018-09-10 09:34 jasoncool1 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 对mid两边进行binary search 得出边界 阅读全文
posted @ 2018-09-10 06:14 jasoncool1 阅读(95) 评论(0) 推荐(0) 编辑