Problem | Solution |
---|---|
48. Rotate Image | Solution |
54. Spiral Matrix | 注意半边之后要重新判断 |
287. Find the Duplicate Number | Binary Search(C++) | Cycle Detection(Java) |
418. Sentence Screen Fitting | 建立退格的mapping |
Problem | Solution |
---|---|
162. Find Peak Element | binary search找peak |
315. Count of Smaller Numbers After Self | Java Solution |
1008. Construct Binary Search Tree from Preorder Traversal | 递归O(n)解 |
Problem | Solution |
---|---|
315. Count of Smaller Numbers After Self | C++ Solution |
Problem | Solution |
---|---|
341. Flatten Nested List Iterator | List Iterator |
Problem | Solution |
---|---|
148. Sort List | merge sort | space O(1) Solution |
Problem | Solution |
---|---|
43. Multiply Strings | Solution |
50. Pow(x, n) | Solution |
837. New 21 Game | 算累加条件概率 |
Problem | Solution |
---|---|
528. Random Pick with Weight | Random + binarySeach |
384. Shuffle an Array | inside-out shuffle |
470. Implement Rand10() Using Rand7() | Solution |
Problem | Solution |
---|---|
307. Range Sum Query - Mutable | Segment Tree模版 |
Problem | Solution |
---|---|
468.Validate IP Address | String split, NumberFormatException |
Problem | Solution |
---|---|
215. Kth Largest Element in an Array | quick select |
973 K Closest Points to Origin | Quick Select |
347. Top K Frequent Elements | freq有上限, bucket sort |
Problem | Solution |
---|---|
199. Binary Tree Right Side View | preorder + level check |
662. Maximum Width of Binary Tree | Solution |
1110. Delete Nodes And Return Forest | Solution |
Problem | Solution |
---|---|
846. Hand of Straights | 注意follow up |