摘要:
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
阅读(228)
推荐(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
阅读(155)
推荐(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
阅读(148)
推荐(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
阅读(180)
推荐(0)
编辑
摘要:
1. put element do not forget to + 1 2. do not forget left move left++.
阅读全文
posted @ 2016-07-01 14:46
keepshuatishuati
阅读(144)
推荐(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
阅读(112)
推荐(0)
编辑
摘要:
1. Be careful with index.
阅读全文
posted @ 2016-07-01 05:21
keepshuatishuati
阅读(127)
推荐(0)
编辑
摘要:
1. One thing need to be notice that if player put to wrong place...
阅读全文
posted @ 2016-07-01 05:01
keepshuatishuati
阅读(139)
推荐(0)
编辑