[leetcode]做过的题的目录

时间:2021-10-17 12:15:14

随着做过的题越来越多,我觉得我需要一个目录来让我飞快的找到题目。

题目名称 难易程度 可考虑的解法
204. Count Primes  Easy check every number read detals 
190. Reverse Bits Easy  Bit operation 
154. Find Minimum in Rotated Sorted Array II  Hard  Binary Search 
165. Compare Version Numbers  Medium  compare every sigle number 
187. Repeated DNA Sequences Medium  using map 
698. Partition to K Equal Sum Subsets  Medium  DFS / DP 
445. Add Two Numbers II  Medium  Using Stack 
582. Kill Process Medium  using queue to help 
74. Search a 2D Matrix  Medium  Binary Search
129. Sum Root to Leaf Numbers Medium  Recursion 
199. Binary Tree Right Side View Medium  Layer traverse  
831. Masking Personal Information  Medium  Check every situations 
516. Longest Palindromic Subsequence  Medium  Dynamic Programming
251. Flatten 2D Vector  Medium  using iterators
140. Word Break II  hard  memorized searching 
296. Best Meeting Point  hard  Hamilton distance read details
450. Delete Node in a BST  Medium  recursion read details 
290. Word Pattern  Easy  Using hashmap
266. Palindrome Permutation  Easy  counting the appearance times of characteristics
186. Reverse Words in a String II  Medium  using stack
648. Replace Words Medium  HashMap 
203. Remove Linked List Elements Easy check every nodes and recorde previous node
442. Find All Duplicates in an Array Medium  read details(assign each number to its position 
807. Max Increase to Keep City Skyline  Medium  find column maximum and row maximum 
433. Minimum Genetic Mutation  Medium  using bfs to test every possible mutation 
205. Isomorphic Strings  Easy  using hash-map to store last position
457. Circular Array Loop  Medium  using fast and slow pointers
735. Asteroid Collision Medium  using vector to store the alive asteroid
722. Remove Comments Medium  check every character one by one 
298. Binary Tree Longest Consecutive Sequence  Medium  recursion
117. Populating Next Right Pointers in Each Node II  Medium  nested loop with pointers (read details)
116. Populating Next Right Pointers in Each Node Medium  layer traverse by queue
163. Missing Ranges  Medium  traverse the array 
727. Minimum Window Subsequence  Hard  DP 
336. Palindrome Pairs Hard  Hash Map
642. Design Search Autocomplete System  Hard  Trie tree with priority queue
65. Valid Number Hard DFA
139. Word Break Medium DP 
489. Robot Room Cleaner  Hard DFS and store relative position to avoid infinite loop
745. Prefix and Suffix Search  Hard Trie tree 
56. Merge Intervals  Medium sort and merge 
67. Add Binary Easy String operation 
256. Paint House  Easy  DP 
265. Paint House II  Hard  DP 
275. H-Index II  Medium  Binary search 
410. Split Array Largest Sum  Hard  Greedy and Binary search 
88. Merge Sorted Array Easy  fill spaces back to front
801. Minimum Swaps To Make Sequences Increasing
Medium  DP 
764. Largest Plus Sign Medium  traverse the matrix 
865. Smallest Subtree with all the Deepest Nodes  Medium  post-order traverse by recursion 
426. Convert Binary Search Tree to Sorted Doubly Linked List Medium  In-order traverse by iteration 
334. Increasing Triplet Subsequence Medium  read details  
639. Decode Ways II  Hard  watch out cornner cases 
784. Letter Case Permutation Easy   change to the same case and then change
68. Text Justification Hard  read details  
109. Convert Sorted List to Binary Search Tree  Meidum Divide and Conquer 
173. Binary Search Tree Iterator  Medium use stack to help 
543. Diameter of Binary Tree Easy recursion; read question carefully!!
20. Valid Parentheses  Easy using stack
269. Alien Dictionary  Hard Topological sort
554. Brick Wall  Medium Analyze the questions first! used Map
721. Accounts Merge  Medium Union Find
824. Goat Latin Easy Using stringstream and apply the rule
689. Maximum Sum of 3 Non-Overlapping Subarrays Hard Divide it into 3 parts and DP
283. Move Zeroes   Easy  2 pointers 
282. Expression Add Operators  Hard DFS and consider the priority 
158. Read N Characters Given Read4 II - Call multiple times Hard read Details 
210. Course Schedule II  Medium  topological sorting
286. Walls and Gates Medium  BFS 
750. Number Of Corner Rectangles Medium  taverse with pruning 
274. H-Index  Medium  understanding the questions first! 
636. Exclusive Time of Functions  Medium  using stack and pointers 
477. Total Hamming Distance  Medium  finding the rule in the changing 
380. Insert Delete GetRandom O(1)  Medium  map and array, the point is O(1) 
825. Friends Of Appropriate Ages  Medium  analysis given inequation
398. Random Pick Index Medium  reservoir sampling
523. Continuous Subarray Sum  Medium  accumulate sum 
525. Contiguous Array  Medium  accumulate sum 
332. Reconstruct Itinerary  Medium  use multiset and DFS 
323. Number of Connected Components in an Undirected Graph Medium  build a adjacent list and DFS 
249. Group Shifted Strings  Medium loop with visited
382. Linked List Random Node  Meidum reservoir sampling 
stock系列 121 & 122 & 309 & 714 & 123 & 188  Easy&Medium&Hard Dp
316. Remove Duplicate Letters  Hard  used map and loop, read detail 
289. Game of Life Medium traverse and change the value
164. Maximum Gap  Hard  Bucket sort 
804. Unique Morse Code Words  Easy  Using set and vectors 
220. Contains Duplicate III  Medium  Using sliding windows and maps 
335. Self Crossing  Hard Enum all possible situations 
233. Number of Digit One  Hard  Find its patter 
179. Largest Number Medium  Sort by new comparator 
229. Majority Element II  Medium  Moore voting 
169. Majority Element  Easy  Moore voting 
540. Single Element in a Sorted Array  Medium  Binary Search 
419. Battleships in a Board Medium  traverse and judge 
150. Evaluate Reverse Polish Notation  Medium  stack 
53. Find Minimum in Rotated Sorted Array Easy  Binary search 
319. Bulb Switcher Medium observe the previous results and do math
223. Rectangle Area Medium do math
479. Largest Palindrome Product  Easy  do math
219. Contains Duplicate II  Easy  map  !!careful!! 
438. Find All Anagrams in a String  Easy  sliding window 
406. Queue Reconstruction by Height Medium analysis the problems 
581. Shortest Unsorted Continuous Subarray  Easy  read detail:) 
416. Partition Equal D Sum  Medium  DP
124. Binary Tree Maximum Path Sum Medium  traverse by recursion 
240. Search a 2D Matrix II Medim  Find the special corner as start 
160. Intersection of Two Linked Lists Easy  check from the same length 
6. ZigZag Conversion  Medium  find relationships or store in arrays 
172. Factorial Trailing Zeroes  Easy  find number of 5 
152. Maximum Product Subarray  Medium  using 2(max, min) help array 
149. Max Points on a Line Hard use map and cal gcd 
22. Generate Parentheses Medium DFS + limits
328. Odd Even Linked List Medium  pointers 
338. Counting Bits Meidum  loop with vector
293. Flip Game && 294. Flip Game II Easy & Medium back tracking 
292. Nim Game Easy Game Theory 
4. Median of Two Sorted Arrays Hard with 2 pointers 
209. Minimum Size Subarray Sum  Medium sliding window 
322. Coin Change  Medium DP 
673. Number of Longest Increasing Subsequence Medium with 2 record vector read details :)
287. Find the duplicate Number Meidum  binary search and fast and slow pointer 
377. Combination Sum IV Meidum  DP
89. Gray Code Medium details:) 
43. Multiply Strings Medium  use array to store product 
143. Reorder List Medium  break the list into 2 lists, process them
57. Insert Interval Hard details :)
76. Minimum Window Substring Hard Sliding Window
285. Inorder Successor in BST Medium characteristic of BST, or In-order traverse
161. One Edit Distance  Medium  Consider corner situations 
311. Sparse Matrix Multiplication  Medium  pre-process one matrix 
494. Target Sum  Medium  DFS with memory searching to optimize
670. Maximum Swap Medium find the maximum of its right including itself 
157. Read N Characters Given Read4 Easy  read detail:)
680. Valid Palindrome II Easy optimal bruce force
314. Binary Tree Vertical Order Traversal Medium Level order traverse + map
325. Maximum Size Subarray Sum Equals k Medium accumulate sum + hashmap
253. Meeting Rooms II Medium heap(priority_queue)
621. Task Scheduler  Medium  greedy & queue / mathematics
277. Find the Celebrity Medium read details:) 
273. Integer to English Words  Hard use map
301. Remove Invalid Parentheses Hard  BFS / recursion 
128. Longest Consecutive Sequence Hard use set
236. Lowest Common Ancestor of a Binary Tree Medium PreOrder traverse with stack and pruning
168. Excel Sheet Column Title Easy loop and reverse() 
127. Word Ladder Medium BFS, uses queue and map to help 
560. Subarray Sum Equals K Medium use map store the times of sum appears
647. Palindromic Substrings Medium check every possible
151. Reverse Words in a String Medium STL: reverse()
535. Encode and Decode TinyURL Medium HashMap + rand()
297. Serialize and Deserialize Binary Tree Hard iostream
208. Implement Trie (Prefix Tree) Medium Trie tree
146. LRU Cache Hard Hashmap + list + iterator
632. Smallest Range Hard  
134. Gas Station Medium Greedy
692. Top K Frequent Words Medium HashMap+pair
347. Top K Frequent Elements Medium HashMap+pair
106. Construct Binary Tree from Inorder and Postorder Traversal Medium recursion
105. Construct Binary Tree from Preorder and Inorder Traversal Medium recursion
81. Search in Rotated Sorted Array II Medium binary search
33. Search in rotated sorted array Medium binary search
120. Triangle Medium  
391. Perfect Rectangle Hard using the area and 4 points
97. Interleaving String Hard dp
45. Jump Game II Hard greedy
148. Sort List Medium merge sort
59. Spiral Matrix II Medium  
147. Insertion Sort List Medium insertion sort
73. Set Matrix Zeroes Medium  
189. Rotate Array Easy  
118. Pascal's Triangle && 119. Pascal's Triangle II Easy queue
90. Subsets II Medium  
78. Subsets Medium  
93. Restore IP Addresses Medium DFS
71. Simplify Path Medium sstream
82. Remove Duplicates from Sorted List II Medium pointer
26.Remove Duplicates from Sorted Array Easy pointer
95. Unique Binary Search Trees II Medium DFS / DP
96. Unique Binary Search Trees Medium DP
312. Burst Balloons Hard DP(区间DP)
99. Recover Binary Search Tree Hard Inorder traverse
98. Validate Binary Search Tree Medium Inorder traverse
30. Substring with Concatenation of All Words Hard DFS + HashMap
29. Divide Two Integers Medium bit operation
443. String Compression Easy  
92. Reverse Linked List II Medium  
114. Flatten Binary Tree to Linked List Medium stack
814. Binary Tree Pruning Medium  
324. Wiggle Sort II Medium  
341. Flatten Nested List Iterator Medium stack
300. Longest Increasing Subsequence Medium  
72. Edit Distance Hard DP
63. Unique Paths II Medium DP
221.Maximal Square Medium  
House Robbers. 198 & 213 Medium & Easy DP
218.The Skyline Problem  Hard scan line problem: heap
41. First Missing Positive Hard interesting method
138. Copy List with Random Pointer Medium map / list operation
278. First Bad Version  Easy binary search
69. Sqrt(x) Easy binary search
162. Find Peak Element Medium binary search
239. Sliding Window Maximum Hard heap/deque
654. Maximum Binary Tree Medium  
85. Maximal Rectangle hard  
36. Valid Sudoku Medium record matrix
32. Longest Valid Parentheses Hard stack
61. Rotated List Medium  
leetcode栈系列155 & 232 & 349 Easy stack / 2 stacks
480. Sliding Window Median Hard 2 heaps
295. Find Median From Data Stream Hard 2 heaps
84. Large rectangle in histogram Hard monotonous stack
34. Search for a Range Medium  
44.wildcard matching Hard DP
48. Rotate Image Medium  
49. Group Anagrams Medium hashmap
10.Regular Expression Matching Hard recursion/DP
25. Reverse Node in k-Group Hard  
Leetcode Combination系列:39 & 77 & 40 & 216 & 17  Medium DFS
38. Count and Say Easy  
35. search Insert Position Easy  
46.Permutation & 47.Permutation II
Medium DFS
5 Longest Palindromic Substring Medium Manarch / common
12. Integer to Roman Medium  
13. Roman to Integer Easy Hash-Map
8. String to Integer Medium  
42. Trapping Rain Water Hard  
407. trapping rain water II Hard heap
11. Container with Most Water Medium  
19 Remove Nth Node From End of List Medium fast and slow pointers
23. Merge K sorted List Hard heap
234. Palindrome Linked List Easy stack
142. LinkedList Cycle II Medium fast and slow pointers
141.Linked List Cycle 快慢指针 Easy fast and slow pointers
leetcode Sum合集 Easy & Medium map
79.word search Medium DFS with visited array
261.Graph Valid Tree Medium Union Find to find circle
305.Number Of Islands II Hard Union Find