摘要:
Code is simple. But the logic is: 1. start search from [1, n], when you find a number in nums that less than missed, add it to missed. Then you can fo 阅读全文
posted @ 2016-07-01 16:09
keepshuatishuati
阅读(233)
评论(0)
推荐(0)
摘要:
1. This is counting leaves and trees method. It should starting from end, which gareentee the leaves is larger than tree. A nice regex work: 阅读全文
posted @ 2016-07-01 15:56
keepshuatishuati
阅读(161)
评论(0)
推荐(0)
摘要:
1 public class Solution { 2 public List findItinerary(String[][] tickets) { 3 List result = new ArrayList(); 4 if (tickets.length == 0 || tickets[0].length == 0) { 5 ... 阅读全文
posted @ 2016-07-01 15:31
keepshuatishuati
阅读(159)
评论(0)
推荐(0)
摘要:
1. j can reach word[i].length() since it can form an empty string; 2. to aviod duplication ( empty string can cause two found for a pair ,ex [abcd, db 阅读全文
posted @ 2016-07-01 15:12
keepshuatishuati
阅读(195)
评论(0)
推荐(0)
摘要:
1. put element do not forget to + 1 2. do not forget left move left++. 阅读全文
posted @ 2016-07-01 14:46
keepshuatishuati
阅读(152)
评论(0)
推荐(0)
摘要:
1 /** 2 * // This is the interface that allows for creating nested lists. 3 * // You should not implement it, or speculate about its implementation 4 * public interface NestedInteger { 5 * ... 阅读全文
posted @ 2016-07-01 05:40
keepshuatishuati
阅读(120)
评论(0)
推荐(0)
摘要:
1. Be careful with index. 阅读全文
posted @ 2016-07-01 05:21
keepshuatishuati
阅读(133)
评论(0)
推荐(0)
摘要:
1. One thing need to be notice that if player put to wrong place... 阅读全文
posted @ 2016-07-01 05:01
keepshuatishuati
阅读(147)
评论(0)
推荐(0)
摘要:
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
阅读(187)
评论(0)
推荐(0)
浙公网安备 33010602011771号