这是一个记录我做过的LeetCode习题的repo,用来日后的复习。 希望可以坚持。
- 面试题 01.02.Check Permutation LCCI (100%)
- 面试题 03.03.Stack of Plates LCCI (50%)
- 面试题 04.05.Legal Binary Search Tree LCCI 84.82%
- 面试题08.05.Recursive Multiply (时间64.47%,空间100%)
- 面试题10.03.Search Rotate Array (95%)
- 剑指 Offer II 078.[合并排序链表] (MergeKLists.cpp) (96%)
- 剑指 Offer 59 - II. [队列的最大值] (MaxQueue.cpp) (50%)
- LCP 5.Coin Bonus (时间100%,第一次学到线段树,题解同时需要用到dfs和线段树,非常有收获)
- 4.Medien of two sorted array (效率理论上理想,实际上不如随手写的O(M+N)代码)
- 16.Three Sum Closest (%90.59 不过其实是看了别人的想法做的)
- 19.Remove Nth Node From End Of List (100%)
- 31.Next Permutation (82.95%)
- 42.Trapping Rain Water (42%)
- 44.Wildcard Matching (60%)
- 50.Pow(x,n) (80.78%)
- 56.Merge Intervals (94.86%)
- 58.Length of Last Word (100%)
- 66.Plus One (100%)
- 68.Text Justification (100%)
- 75.Sort Colors (30%)
- 135.Candy (Extremely slow...)
- 138.Copy List With Random Pointer (99.1%)
- 140.Word Break II (39%)
- 165.Compare Version Numbers (100%)
- 171.Excel Sheet Column Number (100%)
- 179.Largest Number (40%)
- 206.Reverse List (97.04%)
- 208.Implement Trie
- 212.Find Words II (64.03%)
- 217.Contains Duplicate (94.86%)
- 219.Contain Nearby Duplicates (40%)
- 221.Maximum Square (90%)
- 223.Rectangle Area (90%)
- 224.Basic Calculator (50%)
- 226.Invert Binary Tree (54%)
- 233.Number Of Digit One (100.00%)
- 234.Palindrome Linked List (90%)
- 258.Add Digits (100.0%)
- 295.Find Median From Data Stream (93.36%)
- 300.Longest Increasing Subsequence (60%)
- 312.Burst Balloons (90.12%)
- 322.Coin Change (85%)
- 328.Odd Even Linked List (88%)
- 335.Self Crossing (100%)
- 365.Water and Jug Problem (100%)
- 378.Kth Smallest Element in a Sorted Matrix (55%)
- 395.Longest Substring (74.17%)
- 407.Trapping Rain Water II (80%)
- 412.Fizz Buzz (84%)
- 413.Arithmetic Slices (bad performance)
- 435.Non-overlapping Intervals (22%)
- 438.Path Sum III (15%)
- 492.Construct Rectangle (100%)
- 450.Delete Node in a BST (97%)
- 453.Minimum Moves to Equal Array Elements (80%)
- 458.Poor Pigs (100%)
- 461.Hamming Distance (91.72%)
- 470.Implement Rand10() Using Rand7() (99.08%)
- 488.Zuma Game (11.11%) So shame
- 514.Freedom Trail (75%)
- 516.Longest Palindromic Subsequence (80%)
- 517.Super Washing Machines (94%)
- 552.Student Attendance RecordII (78.95%)
- 638.Shopping Offers (14%,记忆化搜索)
- 639.Decode Ways II (20%)
- 662.Maximum Width Of Binary Tree (100%)
- 703.Kth Largest Element in a Stream (81%)
- 728.Daily Temperture (89.40%)
- 743.Network Delay Time (Fxxking slow)
- 768.Max Chunks To Make Sorted II (91.3%)
- 786.Kth Smallest Prime Fraction (57.81%)
- 863.All Nodes Distance K in Binary Tree (90%)
- 866.Prime Palindrome (92.00%)
- 910.Smallest Range II (96.55%)
- 914.X of a Kind in a Deck of Cards (97.32%)
- 925.Long Pressed Name (100%)
- 977.Squares of a Sorted Array (30%)
- 1044.Longest Duplicate Substring (时间24.28%,空间89.09%)
- 1104.Path In Zigzag Labelled Binary Tree (时间100%空间90%)
- 1124.Longest Well-Performing Interval (时间51.3%,空间8.08%)
- 1131.Maximum of Absolute Value Expression (89.74%)
- 1253.Reconstruct a 2-Row Binary Matrix (时间93.46%,空间69.16%)
- 1300.Sum of Mutated Array Closest to Target (96.78%)
- 1315.Sum of Nodes with Even-Valued Grandparent (没做优化表现不佳)
- 1337.The K Weakest Rows in a Matrix (86%)
- 1339.Maximum Product of Splitted Binary Tree (时间99.04%,内存100%)
- 1370.Increasing Decreasing String (时间91.01%,空间90.04%)
- 1377.Frog Position After T Seconds (16.31%)
- 1388.Pizza With 3n Slices 很差
- 1680.Concatenation of Consecutive Binary Numbers (67%)
- 1790.Check if One String Swap Can Make Strings Equal (100%)
- 1896.Minimum Cost to Change the Final Value of Expression (25%) 感觉跟又做了一遍compiler的lab一样。。