LeetCode
For LeetCode.
(2018.04.23 Updated)
目前进度
Array
- 1 Two Sum (easy)
- 暴力解法:时间复杂度O(n^2)
- 利用map hash:时间复杂度O(n)
- 26 Remove Duplicates from Sorted Array (easy)
Linked List
- 21 Merge Two Sorted Lists (easy)
- 83 Remove Duplicates from Sorted List (easy)
- 141 Linked List Cycle (easy)
- 160 Intersection of Two Linked Lists (easy)
- 206 Reverse Linked List (easy)
- 234 Palindrome Linked List (easy)
- 237 Delete Node in a Linked List (easy)
- 725 Split Linked List in Parts (medium)
Tree
- 101 Symmetric Tree
- 104 Maximum Depth of Binary Tree
- 111 Minimum Depth of Binary Tree
- 226 Invert Binary Tree
- 437 Path Sum III
- 538 Convert BST to Greater Tree
- 543 Diameter of Binary Tree
- 572 Subtree of Another Tree
- 617 Merge Two Binary Trees
Dynamic Programming
- 322 Coin Change
- 62 Unique Paths
- 55 Jump Game
- 91 Decode Ways
- 63 Unique Paths II
- 674 Longest Continuous Increasing Subsequence
- 64 Minimum Path Sum
- 338 Counting Bits
- 198 House Robber
- 213 House Robber II
- 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
- 188 Best Time to Buy and Sell Stock IV
- 300 Longest Increasing Subsequence
- 354 Russian Doll Envelopes
- 279 Perfect Squares
- 132 Palindrome Partitioning II
- 516 Longest Palindromic Subsequence
- 87 Scramble String
- 97 Interleaving String
- 72 Edit Distance
- 10 Regular Expression Matching
- 44 Wildcard Matching
字符串相关
- 最长回文子串
- 动态规划法:时间复杂度O(n^2),辅助空间O(n^2)
- 枚举中心点法:时间复杂度O(n^2)
- Manacher算法(not yet)
- 最长上升子序列
- 动态规划法:时间复杂度O(n^2),辅助空间O(n)
- 维护tails法:时间复杂度O(nlgn),辅助空间最差为O(n)