# LeetCode

The software engineer is always brutal, you might have to solve a problem with pen and whiteboard in 45 minutes, while it may take days to program in a modern IDE with handy Google search to solve the similar problem in your daily work. The only way to excel in the code interview is practice. Here is my homework on LeetCode:

1. Two Sum
3. Longest Substring Without Repeating Characters
4. Median of Two Sorted Arrays
5. Longest Palindromic Substring
6. ZigZag Conversion
7. Reverse Integer
8. String to Integer (atoi)
9. Palindrome Number
10. Regular Expression Matching
11. Container With Most Water
12. Integer to Roman
13. Roman to Integer
14. Longest Common Prefix
15. 3Sum
16. 3Sum Closest
17. Letter Combinations of a Phone Number
18. 4Sum
19. Remove Nth Node From End of List
20. Valid Parentheses
21. Merge Two Sorted Lists
22. Generate Parentheses
23. Merge k Sorted Lists
24. Swap Nodes in Pairs
25. Reverse Nodes in k-Group
26. Remove Duplicates from Sorted Array
27. Remove Element
28. Implement strStr()
29. Divide Two Integers
30. Substring with Concatenation of All Words
31. Next Permutation
32. Longest Valid Parentheses
33. Search in Rotated Sorted Array
34. Search for a Range
35. Search Insert Position
36. Valid Sudoku
37. Sudoku Solver
38. Count and Say
39. Combination Sum
40. Combination Sum II
41. First Missing Positive
42. Trapping Rain Water
43. Multiply Strings
44. Wildcard Matching
45. Jump Game II
46. Permutations
47. Permutations II
48. Rotate Image
49. Group Anagrams
50. Pow(x, n)
51. N-Queens
52. N-Queens II
53. Maximum Subarray
54. Spiral Matrix
55. Jump Game
56. Merge Intervals
57. Insert Interval
58. Length of Last Word
59. Spiral Matrix II
60. Permutation Sequence
61. Rotate List
62. Unique Paths
63. Unique Paths II
64. Minimum Path Sum
65. Valid Number
66. Plus One
68. Text Justification
69. Sqrt(x)
70. Climbing Stairs
71. Simplify Path
72. Edit Distance
73. Set Matrix Zeroes
74. Search a 2D Matrix
75. Sort Colors
76. Minimum Window Substring
77. Combinations
78. Subsets
79. Word Search
80. Remove Duplicates from Sorted Array II
81. Search in Rotated Sorted Array II
82. Remove Duplicates from Sorted List II
83. Remove Duplicates from Sorted List
84. Largest Rectangle in Histogram
85. Maximal Rectangle
86. Partition List
87. Scramble String
88. Merge Sorted Array
89. Gray Code
90. Subsets II
91. Decode Ways
94. Binary Tree Inorder Traversal
95. Unique Binary Search Trees II
96. Unique Binary Search Trees
97. Interleaving String
98. Validate Binary Search Tree
99. Recover Binary Search Tree
100. Same Tree
101. Symmetric Tree
102. Binary Tree Level Order Traversal
103. Binary Tree Zigzag Level Order Traversal
104. Maximum Depth of Binary Tree
105. Construct Binary Tree from Preorder and Inorder Traversal
106. Construct Binary Tree from Inorder and Postorder Traversal
107. Binary Tree Level Order Traversal II
108. Convert Sorted Array to Binary Search Tree
109. Convert Sorted List to Binary Search Tree
110. Balanced Binary Tree
111. Minimum Depth of Binary Tree
112. Path Sum
113. Path Sum II
114. Flatten Binary Tree to Linked List
115. Distinct Subsequences
116. Populating Next Right Pointers in Each Node
117. Populating Next Right Pointers in Each Node II
118. Pascalâ€™s Triangle
119. Pascalâ€™s Triangle II
120. Triangle
121. Best Time to Buy and Sell Stock
122. Best Time to Buy and Sell Stock II
123. Best Time to Buy and Sell Stock III
124. Binary Tree Maximum Path Sum
125. Valid Palindrome
128. Longest Consecutive Sequence
129. Sum Root to Leaf Numbers
130. Surrounded Regions
131. Palindrome Partitioning
132. Palindrome Partitioning II
133. Clone Graph
134. Gas Station
135. Candy
136. Single Number
137. Single Number II
138. Copy List with Random Pointer
139. Word Break
140. Word Break II
143. Reorder List
144. Binary Tree Preorder Traversal
145. Binary Tree Postorder Traversal
146. LRU Cache
147. Insertion Sort List
148. Sort List
149. Max Points on a Line
150. Evaluate Reverse Polish Notation
151. Reverse Words in a String
152. Maximum Product Subarray
153. Find Minimum in Rotated Sorted Array
154. Find Minimum in Rotated Sorted Array II
155. Min Stack
156. Binary Tree Upside Down
159. Longest Substring with At Most Two Distinct Characters
160. Intersection of Two Linked Lists
161. One Edit Distance
162. Find Peak Element
163. Missing Ranges
164. Maximum Gap
165. Compare Version Numbers
166. Fraction to Recurring Decimal
167. Two Sum II - Input array is sorted
168. Excel Sheet Column Title
169. Majority Element
170. Two Sum III - Data structure design
171. Excel Sheet Column Number
172. Factorial Trailing Zeroes
173. Binary Search Tree Iterator
174. Dungeon Game
1. Largest Number
2. Reverse Words in a String II
1. Repeated DNA Sequences
2. Best Time to Buy and Sell Stock IV
3. Rotate Array
4. Reverse Bits
5. Number of 1 Bits
1. Binary Tree Right Side View
2. Number of Islands
3. Bitwise AND of Numbers Range
4. Happy Number
6. Count Primes
7. Isomorphic Strings
9. Course Schedule
10. Implement Trie (Prefix Tree)
11. Minimum Size Subarray Sum
12. Course Schedule II
13. Add and Search Word - Data structure design
14. Word Search II
15. House Robber II
16. Shortest Palindrome
17. Kth Largest Element in an Array
18. Combination Sum III
19. Contains Duplicate
20. The Skyline Problem
21. Contains Duplicate II
22. Contains Duplicate III
23. Maximal Square
24. Count Complete Tree Nodes
25. Rectangle Area
26. Basic Calculator
27. Implement Stack using Queues
28. Invert Binary Tree
29. Basic Calculator II
30. Summary Ranges
31. Majority Element II
32. Kth Smallest Element in a BST
33. Power of Two
34. Implement Queue using Stacks
35. Number of Digit One