摘要: DO NOT forget to move the end index one more. Otherwise, it will keep stucking in same vowel. 阅读全文
posted @ 2016-06-29 15:21 keepshuatishuati 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Last DP element MAY NOT be the answer since the max number can happened between. 阅读全文
posted @ 2016-06-29 15:10 keepshuatishuati 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Another solution is sort all the points and create another reflected points array. Sort again, then they should be same. 阅读全文
posted @ 2016-06-29 15:03 keepshuatishuati 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1. When n == 0, it return 1. 2. Since already make result = 10, count until 2. 阅读全文
posted @ 2016-06-29 14:57 keepshuatishuati 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 1 public class Solution { 2 public List largestDivisibleSubset(int[] nums) { 3 List result = new ArrayList(); 4 if (nums.length == 0) { 5 return result; 6 ... 阅读全文
posted @ 2016-06-29 14:43 keepshuatishuati 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 1. Do not need to update all the element from i to j. Since it starts with all 0 array. We can simple use start and end as the mark, sum all the value 阅读全文
posted @ 2016-06-29 14:24 keepshuatishuati 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1 /** 2 * Definition for singly-linked list. 3 * public class ListNode { 4 * int val; 5 * ListNode next; 6 * ListNode(int x) { val = x; } 7 * } 8 */ 9 public class Solutio... 阅读全文
posted @ 2016-06-29 13:50 keepshuatishuati 阅读(154) 评论(0) 推荐(0) 编辑