『Leetcode』All My AC Subjects and Solutions
/ / 点击 / 阅读耗时 6 分钟Follows are all my ac Leetcode solutions, total 212.
Since it has been a real long time, i will not give some detail expalination.
1 Two Sum
2 Add Two Numbers
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
31 Next Permutation
33 Search in Rotated Sorted Array
34 Search for a Range
35 Search Insert Position
36 Valid Sudoku
39 Combination Sum
40 Combination Sum II
41 First Missing Positive
42 Trapping Rain Water
43 Multiply Strings
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
65 Valid Number
66 Plus One
67 Add Binary
69 Sqrt(x)
70 Climbing Stairs
73 Set Matrix Zeroes
74 Search a 2D Matrix
75 Sort Colors
77 Combinations
78 Subsets
79 Word Search
80 Remove Duplicates from Sorted Array II
82 Remove Duplicates from Sorted List II
83 Remove Duplicates from Sorted List
84 Largest Rectangle in Histogram
86 Partition List
88 Merge Sorted Array
89 Gray Code
90 Subsets II
91 Decode Ways
93 Restore IP Addresses
97 Interleaving String
98 Validate 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
107 Binary Tree Level Order Traversal II
110 Balanced Binary Tree
111 Minimum Depth of Binary Tree
112 Path Sum
113 Path Sum II
114 Flatten Binary Tree to Linked List
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
125 Valid Palindrome
128 Longest Consecutive Sequence
129 Sum Root to Leaf Numbers
130 Surrounded Regions
136 Single Number
137 Single Number II
139 Word Break
141 Linked List Cycle
144 Binary Tree Preorder Traversal
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
160 Intersection of Two Linked Lists
166 Fraction to Recurring Decimal
167 Two Sum II - Input array is sorted
168 Excel Sheet Column Title
169 Majority Element
171 Excel Sheet Column Number
172 Factorial Trailing Zeroes
187 Repeated DNA Sequences
189 Rotate Array
190 Reverse Bits
198 House Robber
200 Number of Islands
202 Happy Number
203 Remove Linked List Elements
204 Count Primes
205 Isomorphic Strings
206 Reverse Linked List
207 Course Schedule
210 Course Schedule II
215 Kth Largest Element in an Array
216 Combination Sum III
217 Contains Duplicate
219 Contains Duplicate II
220 Contains Duplicate III
221 Maximal Square
223 Rectangle Area
225 Implement Stack using Queues
226 Invert Binary Tree
227 Basic Calculator II
228 Summary Ranges
231 Power of Two
232 Implement Queue using Stacks
234 Palindrome Linked List
235 Lowest Common Ancestor of a Binary Search Tree
237 Delete Node in a Linked List
238 Product of Array Except Self
240 Search a 2D Matrix II
241 Different Ways to Add Parentheses
242 Valid Anagram
257 Binary Tree Paths
258 Add Digits
260 Single Number III
263 Ugly Number
264 Ugly Number II
268 Missing Number
273 Integer to English Words
274 H-Index
275 H-Index II
278 First Bad Version
282 Expression Add Operators
283 Move Zeroes
290 Word Pattern
292 Nim Game
295 Find Median from Data Stream
299 Bulls and Cows
303 Range Sum Query - Immutable
304 Range Sum Query 2D - Immutable
310 Minimum Height Trees
313 Super Ugly Number
318 Maximum Product of Word Lengths
319 Bulb Switcher
322 Coin Change
324 Wiggle Sort II
326 Power of Three
328 Odd Even Linked List
338 Counting Bits
342 Power of Four
343 Integer Break
344 Reverse String
345 Reverse Vowels of a String
347 Top K Frequent Elements
349 Intersection of Two Arrays
350 Intersection of Two Arrays II
357 Count Numbers with Unique Digits
365 Water and Jug Problem
367 Valid Perfect Square
371 Sum of Two Integers
372 Super Pow
377 Combination Sum IV
378 Kth Smallest Element in a Sorted Matrix
383 Ransom Note
386 Lexicographical Numbers
387 First Unique Character in a String
389 Find the Difference
391 Perfect Rectangle
392 Is Subsequence
394 Decode String
396 Rotate Function
401 Binary Watch
402 Remove K Digits
404 Sum of Left Leaves
405 Convert a Number to Hexadecimal
412 Fizz Buzz
413 Arithmetic Slices
414 Third Maximum Number
415 Add Strings
419 Battleships in a Board
438 Find All Anagrams in a String
447 Number of Boomerangs
453 Minimum Moves to Equal Array Elements