刷题质量+刷题数量=Offer
面试遇到的问题:
- 明明刷过这道题,面试被问依然无法100%bug free写出来?
- 会类似的题,但是没法用在新的题上面?
- 被要求解释思路,解释为什么最优?
教训
- 基础不牢
- 每次做题,要知道为什么这么做,而不是这道题该怎么做!
- 每次做题,都以模拟面试的场景要求自己。如果第一次做不到,那么第一次强化学习之后,第二次要进行自我要求。
奋发图强,刷题!
我的刷题计划:
--循环往复1+2
Step1: 每天都要刷题,按照类别进行刷题。
(知识点,一题多解,最优解,复杂度)
Step2: 每个周末二刷这一周做过的题,记录做题状态。
(bug-free?遇到了什么问题?)
分类 | 题号 | 题名称 | Count | 备注 |
---|---|---|---|---|
BST | 108 | Convert Sorted Array to Binary Search Tree | 2 | |
109 | Convert Sorted List to Binary Search Tree | 2 | ||
98 | Valid BST | 2 | ||
700 | Search in a BST | 2 | ||
701 | Insert into a BST | 2 | ||
530 | Minimum Absolute difference in BST | 2 | ||
230 | Kth Smallest Element in a BST | 2 | ||
99 | Recover BST | 2 | ||
222 | Count Complete Tree Nodes | 2 | ||
450 | Delete Node in a BST | 2 | ||
538 | Convert BST to Greater Tree | 2 | ||
173 | Binary Search Tree Iterator | 2 | ||
96 | Unique BST | 2 | ||
95 | Unique BST II | 2 | ||
669 | Trim a Binary Search Tree | 2 | ||
235 | Lowest Common Ancestor of a BST | 2 | ||
783 | Minimum Distance Between BST Nodes | 2 | ||
653 | Two Sum IV -- input is a BST | 2 | ||
449 | Serialize and Deserialize BST | 2 | ||
968 | Binary Tree Camera | 2 | ||
1038 | BST To Greater Sum Tree | 2 | #538 | |
1008 | Construct BST from Preorder Traversal | 2 | #449 | |
563 | Binary Tree Tilt | 2 | ||
662 | Maximum Width of Binary Tree | 2 | BFS & DFS 需要优化 | |
LinkedList | 206 | Reverse Linked List | 2 | 递归与迭代 |
92 | Reverse Linked List II | 2 | ||
24 | Swap Nodes in Pairs | 2 | ||
2 | Add Two Numbers | 2 | ||
445 | Add Two Numbers II | 2 | ||
19 | Remove Nth node from end of list | 2 | ||
203 | Remove Linked List Elements | 2 | ||
207 | Delete Node in a Linked List | 2 | ||
83 | Remove Duplicates from Sorted List | 2 | ||
82 | Remove Duplicates from Sorted List II | 2 | ||
148 | Sort List | 2 | ||
147 | Insertion Sorted List | 2 | ||
143 | Reorder List | 2 | ||
21 | Merge 2 sorted lists | 2 | ||
23 | Merge k sorted lists | 2 | 尝试手动实现优先队列 | |
25 | Reverse Nodes in k-Group | 2 | ||
61 | Rotate List | 2 | ||
86 | Partition List | 2 | ||
141 | Linked List Cycle | 2 | ||
142 | Linked List Cycle II | 2 | ||
160 | Intersection of 2 Linked Lists | 2 | ||
725 | Split Linked List in parts | 2 | 指针 | |
328 | Odd even Linked List | 2 | 指针 | |
234 | Palindrome Linked List | 2 | ||
String | 344 | Reverse String | 2 | |
541 | Reverse String II | 2 | ||
557 | Reverse Words in a String III | 2 | ||
1016 | Binary String With Substrings Representing 1 To N | 2 | ||
647 | Palindromic Substrings | 2 | ||
5 | Longest Palindromic Substring | 2 | ||
3 | Longest Substring w/o Repeating Characters | 2 | ||
115 | Distinct Subsequences | 2 | ||
459 | Repeated Substring Pattern | 2 | ||
345 | Reverse Vowels of a String | 2 | ||
13 | Roman to Integer | 2 | ||
12 | Integer to Roman | 2 | ||
273 | Integer to Engilish Words | 2 | ||
125 | Valid Palindrome | 2 | ||
680 | Valid Palindrome II | 2 | ||
131 | Palindrome Partitioning | 2 | ||
132 | Palindrome Partitioning II | 1 | ||
20 | Valid Parentheses | 2 | ||
22 | Generate Parentheses II | 2 | ||
32 | Longest Valid Parentheses | 2 | ||
241 | Different Ways to Add Parentheses | 1 | ||
301 | Remove Invalid Parentheses | 1 | ||
214 | Shortest Palindrome | 1 | ||
316 | Remove Duplicate Letters | 2 | ||
Array - 1 | 287 | Find the Duplicate Number | 2 | |
4 | Median of 2 Sorted Arrays | 2 | ||
274 | H-Index | 2 | ||
275 | H-Index II | 2 | ||
41 | First Missing Positive | 2 | ||
27 | Remove Element | 2 | ||
26 | Remove Duplicates from Sorted Array | 2 | ||
80 | Remove Duplicates from Sorted Arrays II | 2 | ||
189 | Rotate Array | 2 | ||
75 | Sort Colors | 2 | ||
283 | Move Zeroes | 2 | ||
376 | Wiggle Subsequence | 2 | ||
324 | Wiggle Sort II | 2 | ||
53 | Maximum Subarray | 2 | ||
643 | Maximum Average Subarray I | 2 | ||
209 | Minimum Size Subarray Sum | 2 | ||
238 | Product of Array Except Self | 2 | ||
152 | Maximum product Subarray | 2 | ||
628 | Maximum product of Three Numbers | 2 | ||
713 | Subarray product Less Than K | 2 | ||
560 | Subarray Sum Equals K | 2 | ||
228 | Summary Ranges | 2 | ||
295 | Find Median from Data Stream | 2 | ||
88 | Merge Sorted Array | 2 | ||
Array - 2 | 56 | Merge Intervals | 1 | |
57 | Insert Interval | 1 | ||
915 | Partition Array into Disjoint Intervals | 1 | ||
352 | Data Stream as Disjoint Intervals | 1 | ||
121 | Best time to But and Sell Stack | 1 | ||
122 | Best time to But and Sell Stack II | 1 | ||
123 | Best time to But and Sell Stack III | 1 | ||
188 | Best time to But and Sell Stack IV | 1 | ||
309 | Best time to But and Sell Stack with Cooldown | 1 | ||
334 | Increasing Triple Subsequence | 1 | ||
674 | Longest Continuous Increasing Subsequence | 1 | ||
673 | Number of Longest Increasing Subsequence | 1 | ||
128 | Longest Consecutive Subsequence | 1 | ||
55 | Jump Game | 1 | ||
45 | Jump Game II | 1 | ||
11 | Container with Most Water | 1 | ||
42 | Trapping Rain Water | 1 | ||
Tree--1 | 144 | Binary Tree Preorder Traversal | 2 | |
94 | Binary Tree Inorder Traversal | 2 | ||
145 | Binary Tree Postorder Traversal | 2 | ||
102 | Binary Tree Level Order Traversal | 2 | ||
107 | Binary Tree Level Order Traversal II | 2 | ||
103 | Binary Tree Zigzag Level Order Traversal | 2 | ||
105 | Construct Binary Tree from Preorder and Inorder | 2 | ||
106 | Construct Binary Tree from Inorder and Postorder Traversal | 2 | ||
257 | Binary Tree Paths | 2 | ||
124 | Binary Tree Maximum Path Sum | 2 | ||
110 | Balanced Binary Tree | 2 | ||
226 | Invert Binary Tree | 2 | ||
199 | Binary Tree Right Side View | 2 | ||
114 | Flatten Binary Tree to Linked List | 2 | ||
331 | Verify preorder Serialization pf a Binary Tree | 2 | ||
111 | Minimum Depth of Binary Tree | 2 | ||
104 | Maximum Depth of Binary Tree | 2 | ||
662 | Maximum Width of Binary Tree | 1 | ||
112 | Path Sum | 1 | ||
113 | Path Sum II | 1 | ||
437 | Path Sum III | 1 | ||
404 | Sum of Left Leaves | 1 | ||
129 | Sum Root to Leaf Numbers | 1 | ||
563 | Binary Tree Tilt | 1 | ||
Tree--2 | 100 | Same Tree | 1 | |
101 | Symmetric Tree | 1 | ||
965 | Univalued Binary Tree | 1 | ||
222 | Count Complete Tree Nodes | 1 | ||
508 | Most Frequent Subtree Sum | 1 | ||
116 | Populating Next Right Pointers in Each Node | 1 | ||
117 | Populating Next Right Pointers in Each Node II | 1 | ||
235 | Lowest Common Ancestor of a BST | 1 | ||
236 | Lowest Common Ancestor of a BT | 1 | ||
297 | Serialize and Deserialize Binary Tree | 1 | ||
958 | Check Completeness of a BT | 1 | ||
951 | Flip Equivalent BT | 1 | ||
337 | House Robber III | 1 | ||
834 | Sum if Distances in Tree | 1 | ||
310 | Minimum Height Trees | 1 | ||
558 | Quad Tree Intersection | 1 | ||
993 | Cousins in Binary Tree | 1 | ||
DP | 70 | Climbing Stairs | 1 | |
91 | Decode Ways | 1 | ||
120 | Triangle | 1 | ||
139 | Word Break | 1 | ||
140 | Word Break II | 1 | ||
198 | House Robber | 1 | ||
213 | House Robber II | 1 | ||
279 | Perfect Squares | 1 | ||
263 | Ugly Number | 1 | ||
264 | Ugly Number II | 1 | ||
516 | Longest Palindromic Subsequence | 1 | ||
97 | Interleaving String | 1 | ||
62 | Unique Paths | 1 | ||
63 | Unique Paths II | 1 | ||
64 | Minimum Paths Sum | 1 | ||
72 | Edit Distance | 1 | ||
10 | Regular Expression Matching | 1 | ||
221 | Maximal Square | 1 | ||
322 | Coin Change | 1 | ||
787 | Cheapest Flights Within K stops | 1 | ||
87 | Scramble String | 1 | ||
1035 | Uncrossed Lines | 1 | ||
741 | Cherry Pick up | 1 | ||
Sort | 215 | Kth Largest Element in an Array | 1 | |
34 | Find First and Last Position of Element in Sorted Array | 1 | ||
35 | Search Insert Position | 1 | ||
74 | Search a 2D Matrix | 1 | ||
164 | Maximum Gap | 1 |
表格备注:
- Count1: 第一次刷
知识点,一题多解,最优解,复杂度 - Count2: 第一次回顾
记录做题状态--备注(s1) - Count3: 第二次回顾
记录做题状态--备注(s2)
刷题日记
2019.5.13-2019.5.19 LinkedList * 24 ==> Twice
2019.5.20-2019.5.26 BST * 24 ==> twice
2019.5.27-2019.6.2 String * 24 ==> One Time
2019.6.3-2019.6.9 Array-1 * 24 ==> One Time
2019.6.10-2019.6.16 Array-2 * 24 ==> One Time
2019.6.17-2019.6.28 Tree-1: Binary * 24 ==> One Time
复习考试写作业耽误了一段
2019.7.8-2019.7.14 Tree-2 * 17 ==> One Time && Array-1 * 24 ==> second Time
20197.15-2019.7.20 DP * 24 ==>One Time && Tree-1 ==> Second Time