摘要:
my HashSet+ ArrayList, 删除的时候把要删的index与末尾对调。get()其实不需要random, 因为anyone is ok HashSet+ Queue网上vote最高的solution, 阅读全文
posted @ 2016-12-18 13:37
neverlandly
阅读(340)
评论(0)
推荐(0)
摘要:
Given a non-empty string s and an abbreviation abbr, return whether the string matches with the given abbreviation. A string such as "word" contains only the following valid abbreviations: ["word",... 阅读全文
posted @ 2016-12-18 12:49
neverlandly
阅读(529)
评论(0)
推荐(0)
摘要:
Time Complexity: O(N+K), Space: O(1) 阅读全文
posted @ 2016-12-18 11:49
neverlandly
阅读(332)
评论(0)
推荐(0)
摘要:
Better Solution: https://discuss.leetcode.com/topic/49194/10-lines-simple-java-solution-using-recursion-with-explanation/2 For this question we need t 阅读全文
posted @ 2016-12-18 09:12
neverlandly
阅读(296)
评论(0)
推荐(0)
摘要:
Use Queue Better Solution: can solve follow up, refer to https://discuss.leetcode.com/topic/48758/super-easy-design-o-1-hit-o-s-gethits-no-fancy-data- 阅读全文
posted @ 2016-12-18 07:56
neverlandly
阅读(722)
评论(0)
推荐(0)
摘要:
Walk through the matrix. At the start of each non-wall-streak (row-wise or column-wise), count the number of hits in that streak and remember it. For 阅读全文
posted @ 2016-12-18 06:52
neverlandly
阅读(499)
评论(0)
推荐(0)
浙公网安备 33010602011771号