Coding questions part:
1. Maximum subarray sum (LC53) ok https://leetcode.com/problems/maximum-
subarray/#/description
2. Maximum subarray product (LC318?) ok
https://leetcode.com/problems/maximum-product-of-word-lengths/#/description
3. Flatten nested integer (LC 341) ok https://leetcode.com/problems/flatten-nested-
list-iterator/#/description
4. Address similarity http://www.1point3acres.com/bbs/thread-190507-1-1.html
http://stackoverflow.com/questions/520241/how-do-i-calculate-the-cosine-
similarity-of-two-vectors
具体算法
5. Group anagram (LC49) ok *
https://leetcode.com/problems/anagrams/#/description
6. Word break (LC139) ok *
https://leetcode.com/problems/word-break/#/description
word break. time complexity? follow-up: 如果所给的 known word 很大怎么办?如果有多种方法 break
一个句子,如何确定哪种方法更好?word break II 用 hashmap 问题
7. Word ladder II (LC 126) ok? Hashmap 使用问题
8. Given 4 points, determine whether its a Square, Rectangle, Diamond or 平行四边形 ok
9. Merge Intervals (LC 56) ok *
https://leetcode.com/problems/merge-intervals/#/description
10. Top K address - Top K frequent element (LC347) ok *
https://leetcode.com/problems/top-k-frequent-elements/#/description
11. Word Search I / II (LC 79 & 212) ok * https://leetcode.com/problems/word-
search/#/description
12. https://leetcode.com/problems/word-search-ii/#/description
13. Edit distance with minimum cost (LC 72) ok * https://leetcode.com/problems/edit-
distance/#/description
14. Different ways to add parenthesis (LC 241) ok
https://leetcode.com/problems/different-ways-to-add-parentheses/#/description
15. Isomorphic String (LC 205) ok * https://leetcode.com/problems/isomorphic-
strings/#/description
16. 但問了 follow up.如果兩個 string 很大 memory 放不下要怎麼辦? 給你多一些 Machine 要怎麼做?
hashtable size = 100 兩台機器
hash index 0 ~ 99 放到 machine 1
100 ~ 199 放到 machine 2
17. Reconstruct Itinerary (LC 332) ok * https://leetcode.com/problems/reconstruct-
itinerary/#/description
18. Reservoir Sampling with infinite stream
19. Maximum Square (LC 221) ok
https://leetcode.com/problems/maximal-square/#/description
20. Regular Expression Matching (LC 10)
21. Course Schedule II (LC 207 & 210) https://leetcode.com/problems/course-
schedule/#/description
22. Simplify Path (LC 71)
23. Cosine Similarity
24. Output all possible combination of a2c (变换大小写)
25. Flatten 2D vector (LC 251) ok
26. Min Stack (LC 155) ok * https://leetcode.com/problems/min-stack/#/description
27. Implement BST (add find delete)
28. Select k smallest items in an array (LC 378 ) ok
https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/#/
description
29. Preorder - Inorder reconstruct tree (LC 105) *
https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-
traversal/#/description
30. Amicable pairs http://172.252.15.228/bbs/thread-106852-1-1.html
31. Meeting Room II (LC 252 253) ok
32. Serialize and Deserialize binary tree (LC 297)
https://leetcode.com/problems/serialize-and-deserialize-binary-tree/#/solutions
33. Search Matrix II (LC 74 240) ok https://leetcode.com/problems/search-a-2d-
matrix/#/description
34. Find Duplicate number (LC 287) ok https://leetcode.com/problems/find-the-
duplicate-number/#/description
35. First Bad Version (LC 278) ok
https://leetcode.com/problems/first-bad-version/#/description
36. Skyline Problem (LC 218)
37. Insert Remove Random(1) I/II (LC 380 381) ok
https://leetcode.com/problems/insert-delete-getrandom-o1/#/description
38. Basic SQLs
39. Sync Cursor row http://www.1point3acres.com/bbs/forum.php?
mod=viewthread&tid=206463&extra=page%3D2%26filter%3Dsortid%26sortid
%3D311%26searchoption%5B3046%5D%5Bvalue%5D%3D36%26searchoption
%5B3046%5D%5Btype%5D%3Dradio%26sortid%3D311
40. LC 5 Longest Palindromic Substring (Phone) *
https://leetcode.com/problems/longest-palindromic-substring/#/description
41. LC 128 Longest Consecutive Sequence* https://leetcode.com/problems/longest-
consecutive-sequence/#/description
42. LC 22 Generate Parentheses* https://leetcode.com/problems/generate-
parentheses/#/description
43. LC 435 Non-overlapping Intervals https://leetcode.com/problems/non-
overlapping-intervals/#/description
44. LC 208 Implement Trie (Prefix Tree) https://leetcode.com/problems/implement-
trie-prefix-tree/#/description
45. LRU Cache
46. LC 3 * Longest Substring Without Repeating Characters
https://leetcode.com/problems/longest-substring-without-repeating-characters/
#/description
47. LC 14* Longest Common Prefix https://leetcode.com/problems/longest-common-
prefix/#/description
48. LC 17 * Letter Combinations of a Phone Number
https://leetcode.com/problems/letter-combinations-of-a-phone-number/#/
description
49. Sentence Screen Fitting
https://leetcode.com/problems/sentence-screen-fitting/#/description
50. Integer to English Words
https://leetcode.com/problems/integer-to-english-words/#/description
51. Best Time to Buy and Sell Stock https://leetcode.com/problems/best-time-to-buy-
and-sell-stock/#/description
52. Word Pattern https://leetcode.com/problems/word-pattern/#/description
53. Longest Valid Parentheses https://leetcode.com/problems/longest-valid-
parentheses/#/description