上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 36 下一页
摘要: 1. Do not mess it up with number of islands. Each path extends only choose one. 阅读全文
posted @ 2016-07-02 05:13 keepshuatishuati 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1. Use the condition : he/she knows no one. So you can get candidate by filtering out whether a candidate knows somebody. 2. Use the condition : all o 阅读全文
posted @ 2016-07-02 03:10 keepshuatishuati 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 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) 推荐(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) 推荐(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) 推荐(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) 推荐(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) 推荐(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) 推荐(0) 编辑
摘要: 1. Be careful with index. 阅读全文
posted @ 2016-07-01 05:21 keepshuatishuati 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1. One thing need to be notice that if player put to wrong place... 阅读全文
posted @ 2016-07-01 05:01 keepshuatishuati 阅读(139) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 36 下一页