随笔分类 -  HashSet

摘要:Design and implement a TwoSum class. It should support the following operations: add and find. add - Add the number to an internal data structure.find 阅读全文
posted @ 2017-11-07 06:02 apanda009 阅读(137) 评论(0) 推荐(0)
摘要:Better idea is to maintain a hashset that contains at most k numbers 阅读全文
posted @ 2017-11-07 04:52 apanda009 阅读(105) 评论(0) 推荐(0)
摘要:要注意一种情况:isUnique("cake"), 应该是true. 虽然他的缩写在afterabbr出现,但是那就是他自己,没有别的跟他一样 阅读全文
posted @ 2017-11-06 04:51 apanda009 阅读(162) 评论(0) 推荐(0)
摘要:Graph, DFS (1) Build the map, the key is dividend, the value is also a map whose key is divisor and value is its parameter. For example, a / b = 2.0, 阅读全文
posted @ 2017-07-13 18:49 apanda009 阅读(123) 评论(0) 推荐(0)
摘要:Given N axis-aligned rectangles where N > 0, determine if they all together form an exact cover of a rectangular region. Each rectangle is represented 阅读全文
posted @ 2017-07-11 13:10 apanda009 阅读(144) 评论(0) 推荐(0)