上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 36 下一页
摘要: 1. The score got is not original size of snake since starting score is 0 when snake size is 1. 2. Do not forget to add the head after check death. 阅读全文
posted @ 2016-07-01 04:49 keepshuatishuati 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 1. check children is null or not. 阅读全文
posted @ 2016-06-30 06:50 keepshuatishuati 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1 class TrieNode { 2 // Initialize your data structure here. 3 TrieNode[] children = new TrieNode[26]; 4 boolean isWord; 5 public TrieNode() { 6 } 7 } 8 9 public class T... 阅读全文
posted @ 2016-06-30 06:04 keepshuatishuati 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 36 下一页