摘要: 1. do not forget to intialize the data. 阅读全文
posted @ 2016-06-27 16:07 keepshuatishuati 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 1 public class Logger { 2 private Map data; 3 /** Initialize your data structure here. */ 4 public Logger() { 5 data = new HashMap(); 6 } 7 8 /** Returns true... 阅读全文
posted @ 2016-06-27 12:55 keepshuatishuati 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1. This is a parabola function. So two ends always larger than mid. 2. remember return value. 阅读全文
posted @ 2016-06-27 12:49 keepshuatishuati 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Since the traversal is row by row. So the only one row count is enough. Three conditions are: 1. j == 0 (new line start) or previous column is wall. R 阅读全文
posted @ 2016-06-27 11:46 keepshuatishuati 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1. Set does not have ceiling method. Directly use TreeSet 2. ceiling > value - k, so value - ceiling < k. 3. Put 0 into set first since 0 should be th 阅读全文
posted @ 2016-06-27 11:30 keepshuatishuati 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1. 300 is not included 阅读全文
posted @ 2016-06-27 11:28 keepshuatishuati 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1. Set does not have ceiling method. Directly use TreeSet 2. ceiling > value - k, so value - ceiling < k. 3. Put 0 into set first since 0 should be th 阅读全文
posted @ 2016-06-27 06:00 keepshuatishuati 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 1. 3x3 pattern board. Do not mess it up. 2. pattern counting start from 1, not 0 阅读全文
posted @ 2016-06-27 05:20 keepshuatishuati 阅读(145) 评论(0) 推荐(0) 编辑