(Reference: https://leetcode.com/problems/longest-palindromic-substring/solution/)
Solution | Date |
---|---|
Longest Common Substring | 6/24 |
Brute Force | 6/24 |
Dynamic Programming | 8/14 |
Expand Around Center | 8/12 |
Solution | Date |
---|---|
Head->Rev->End | 7/5 |
Solution | Date |
---|---|
BackTracking | 7/7 |
Dfs | 7/7 |
Solution | Date |
---|---|
BackTracking | 7/7 |
Dfs |
Solution | Date |
---|---|
BruteForce | 7/9 |
Kmp |
Solution | Date |
---|---|
Dfs | 7/10 |
Solution | Date |
---|---|
Two Pointers | 7/11 |
Solution | Date |
---|---|
Sym->UpDown | 7/12 |
Solution | Date |
---|---|
Dfs | 7/12 |
Bfs |
Solution | Date |
---|---|
Brute Force | 7/12 |
Solution | Date |
---|---|
Dfs | 7/15 |
(Other Solutions, Reference: https://leetcode.com/problems/generate-parentheses/solution/)
Solution | Date |
---|---|
BackTracking | 7/15 |
Closure Number | |
Dynamic Programming |
Solution | Date |
---|---|
7/18 |
Solution | Date |
---|---|
Iterative | 7/19 |
Recursive | 7/19 |
(Other Solutions, Reference: https://leetcode.com/problems/swap-nodes-in-pairs/discuss/11019/7-8-lines-C++-Python-Ruby?page=2)
Solution | Date |
---|---|
pointer to pointer | 7/19 |
(Other Solutions, Reference: APAS)
Solution | Date |
---|---|
swap function (IterII) | 7/19 |
break swap (IterIII) | 7/19 |
Solution | Date |
---|---|
LeftShift | 7/20 |
RightShift |
(Other Solutions, Reference: https://leetcode.com/problems/divide-two-integers/discuss/13407/Detailed-Explained-8ms-C++-solution)
Solution | Date |
---|---|
Use Remainder | 7/21 |
Solution | Date |
---|---|
Revise Binary Search | 7/22 |
(Other Solutions, Reference: https://leetcode.com/problems/search-in-rotated-sorted-array/discuss/14425/Concise-O(log-N)-Binary-search-solution)
Solution | Date |
---|---|
Find Smallest First | 7/22 |
(Other Solutions, Reference: https://leetcode.com/problems/search-in-rotated-sorted-array/discuss/14435/Clever-idea-making-it-simple?page=2)
Solution | Date |
---|---|
Infinity | 7/24 |
Solution | Date |
---|---|
MidHigh | 7/24 |
MidLow | 7/24 |
Solution | Date |
---|---|
Expand if duplicate | 7/24 |
(Other Solutions, Reference: https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/discuss/)
Solution | Date |
---|---|
Divide & Conquer |
(Other Solutions, Reference: https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/discuss/14699/Clean-iterative-solution-with-two-binary-searches-(with-explanation))
Solution | Date |
---|---|
Two Binary Search |
(Other Solutions, Reference: https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/solution/)
Solution | Date |
---|---|
Row Col Box | 7/25 |
(Other Solutions, Reference: https://leetcode.com/problems/valid-sudoku/discuss/15464/My-short-solution-by-C++.-O(n2))
Solution | Date |
---|---|
Row Col Box (One Loop) |
Solution | Date |
---|---|
Dfs | 7/25 |
Solution | Date |
---|---|
Multiply | 7/26 |
(Other Solutions, Reference: https://leetcode.com/problems/multiply-strings/discuss/17646/Brief-C++-solution-using-only-strings-and-without-reversal)
Solution | Date |
---|---|
Multiply - Preallocate | 7/26 |
(Other Solutions, Reference: https://leetcode.com/problems/multiply-strings/discuss/17605/Easiest-JAVA-Solution-with-Graph-Explanation)
Solution | Date |
---|---|
MultiplyByPair |
Solution | Date |
---|---|
divide by 2 (Need Fix!) | 7/26 |
(Other Solutions, Reference: https://leetcode.com/problems/powx-n/discuss/19546/Short-and-easy-to-understand-solution)
Solution | Date |
---|---|
multiply by 2 | 7/26 |
(Other Solutions, Reference: https://leetcode.com/problems/powx-n/discuss/19544/5-different-choices-when-talk-with-interviewers)
Solution | Date |
---|---|
Nest MyPow | |
Iterative | |
Bit Op |
Solution | Date |
---|---|
Scan until less than zero | 7/27 |
(Other Solutions, Reference: https://leetcode.com/problems/maximum-subarray/discuss/20193/DP-solution-and-some-thoughts)
Solution | Date |
---|---|
DP | 7/27 |
Solution | Date |
---|---|
Dfs (TLE) | 7/27 |
Recursive | |
DP | 7/27 |
(Other Solutions, Reference: https://leetcode.com/problems/unique-paths/discuss/22954/0ms-5-lines-DP-Solution-in-C++-with-Explanations)
Solution | Date |
---|---|
Optimize DP (Space: O(min(m,n)) | 7/27 |
(Other Solutions, Reference: https://leetcode.com/problems/unique-paths/discuss/22958/Math-solution-O(1)-space?page=2)
Solution | Date |
---|---|
Combinatorial | 7/27 |
Solution | Date |
---|---|
DP | 7/27 |
Solution | Date |
---|---|
Dfs(TLE) | 7/30 |
DP | 7/30 |
DP (With One Array (#62) | |
DP | 7/30 |
Solution | Date |
---|---|
Brute Force | 8/2 |
(Other Solutions, Reference: https://leetcode.com/problems/merge-sorted-array/discuss/29522/This-is-my-AC-code-may-help-you)
Solution | Date |
---|---|
Check From Tail | 8/2 |
Solution | Date |
---|---|
Length, Fast, Slow | 8/2 |
(Other Solutions, Reference: https://leetcode.com/problems/rotate-list/discuss/22735/My-clean-C++-code-quite-standard-(find-tail-and-reconnect-the-list)
)
Solution | Date |
---|---|
Length, Tail |
Solution | Date |
---|---|
Right Down Left Up Check | 8/2 |
(Other Solutions, Reference: https://leetcode.com/problems/spiral-matrix/discuss/20599/Super-Simple-and-Easy-to-Understand-Solution)
Solution | Date |
---|---|
Right Down Left Up |
Solution | Date |
---|---|
Update Index | 8/3 |
(Other Solutions, Reference: https://leetcode.com/problems/jump-game/discuss/20900/Simplest-O(N)-solution-with-constant-space)
Solution | Date |
---|---|
Backward | 8/3 |
(Other Solutions, Reference: https://leetcode.com/problems/jump-game/solution/)
Solution | Date |
---|---|
DP ( top-down ) | |
DP ( bottom-up ) |
Solution | Date |
---|---|
Brute Force | 8/3 |
(Other Solutions, Reference: https://leetcode.com/problems/simplify-path/discuss/25773/My-O(n)-AC-code-.-just-need-to-handle-two-special-cases.)
Solution | Date |
---|---|
Brute Force (Simpilfy Special Case Comparison) |
(Other Solutions, Reference: https://leetcode.com/problems/simplify-path/discuss/25680/C++-10-lines-solution)
Solution | Date |
---|---|
GetLine |
Solution | Date |
---|---|
Sort -> Compare | 8/3 |
(Other Solutions, Reference: https://leetcode.com/problems/merge-intervals/description/)
Solution | Date |
---|---|
Right Down Left Up Check | 8/3 |
(Other Solutions, Reference: https://leetcode.com/problems/spiral-matrix-ii/discuss/22282/4-9-lines-Python-solutions)
Solution | Date |
---|---|
NextPermutation | 8/3 |
(Other Solutions, Reference: https://leetcode.com/problems/permutation-sequence/discuss/22507/%22Explain-like-I'm-five%22-Java-Solution-in-O(n))
Solution | Date |
---|---|
Factorial | 8/6 |
Solution | Date |
---|---|
Binary Search | 8/6 |
(Reference: https://leetcode.com/problems/same-tree/discuss/32687/Five-line-Java-solution-with-recursion)
Solution | Date |
---|---|
Inorder | 8/6 |
Preorder | |
Postorder |
Solution | Date |
---|---|
Combination (n = 44 Fail) |
(Other Solutions, Reference: https://leetcode.com/problems/climbing-stairs/discuss/25299/Basically-it's-a-fibonacci.)
Solution | Date |
---|---|
Fibonacci | 8/8 |
Solution | Date |
---|---|
Head & Tail | 8/14 |
Solution | Date |
---|---|
Dynamic Programming | 8/15 |
Solution | Date |
---|---|
Brute Force | 8/17 |
(Other Solutions, Reference: https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/discuss/14699/Clean-iterative-solution-with-two-binary-searches-(with-explanation)?page=4)
Solution | Date |
---|---|
Revised Binary Search | 8/17 |
Solution | Date |
---|---|
Revised Binary Search | 8/17 |
Solution | Date |
---|---|
Binary Search Condition 1 | 8/18 |
Binary Search Condition 2 | 8/18 |
Binary Search Condition 3 | 8/18 |
Binary Search Condition 4 | 8/18 |
Solution | Date |
---|---|
Revised Binary Search | 8/18 |
Solution | Date |
---|---|
Iter1 | 8/18 |
(Other Solutions, Reference: https://leetcode.com/problems/find-peak-element/solution/)
Solution | Date |
---|---|
Iter2 | |
Sequential | |
Recursive |
Solution | Date |
---|---|
Revised Binary Search | 8/18 |
(Other Solutions, Reference: https://leetcode.com/problems/middle-of-the-linked-list/solution/)
Solution | Date |
---|---|
Two Pointers | 8/19 |
(Other Solutions, Reference: https://leetcode.com/problems/middle-of-the-linked-list/solution/)
Solution | Date |
---|---|
Two Pointers | 8/19 |
Solution | Date |
---|---|
Swap | 8/19 |
(Other Solutions, Reference: https://leetcode.com/problems/move-zeroes/solution/)
Solution | Date |
---|---|
Swap Optimize | 8/19 |
Copy | 8/19 |
Solution | Date |
---|---|
Target and 2 pointers | 8/19 |
Sort | 8/19 |
Hash | 8/19 |
Solution | Date |
---|---|
Counting Sort In Place | 8/19 |
Counting Sort Out Place | 8/19 |
Two Pointers | 8/19 |
Two Pointers Optimize | 8/20 |
Solution | Date |
---|---|
Count In Place | 8/19 |
Two Pointers | 8/20 |
Solution | Date |
---|---|
Two Pointers | 8/20 |
Solution | Date |
---|---|
Hash Table | 8/20 |
Solution | Date |
---|---|
Quick Sort Half | 8/21 |
Solution | Date |
---|---|
Bfs | 8/21 |
Bfs Optimize | 8/22 |
Dfs | |
Union Find |
Solution | Date |
---|---|
Bfs Vector | 8/24 |
Bfs Queue | 8/24 |
Dfs |
(Reference: https://leetcode.com/problems/course-schedule/discuss/58509/18-22-lines-C++-BFSDFS-Solutions)
Solution | Date |
---|---|
Bfs Vector | 8/24 |
(Other Solutions, Reference: https://leetcode.com/problems/course-schedule/discuss/58516/Easy-BFS-Topological-sort-Java)
Solution | Date |
---|---|
Bfs Queue | 8/24 |
Dfs |
Solution | Date |
---|---|
Bfs Level | 8/25 |
(Reference: https://leetcode.com/problems/word-ladder/discuss/40707/Easy-76ms-C++-Solution-using-BFS)
Solution | Date |
---|---|
Bfs Level | 8/25 |
Solution | Date |
---|---|
Topological | 8/26 |
(Reference: https://leetcode.com/problems/serialize-and-deserialize-binary-tree/discuss/74252/Clean-C++-solution)
Solution | Date |
---|---|
Preorder | 8/26 |
(Other Solutions, Reference: https://leetcode.com/problems/serialize-and-deserialize-binary-tree/discuss/74264/Short-and-straight-forward-BFS-Java-code-with-a-queue)
Solution | Date |
---|---|
Bfs |
Solution | Date |
---|---|
Topological Sort | 8/26 |
Solution | Date |
---|---|
Topological Sort | 8/26 |
(Reference: https://leetcode.com/problems/clone-graph/discuss/42313/7-17-lines-C++-BFSDFS-Solutions)
Solution | Date |
---|---|
Bfs | 8/26 |
Dfs |
Solution | Date |
---|---|
Iterative | 8/26 |
Iter Optimize | 8/26 |
Recuresive | 8/26 |
Solution | Date |
---|---|
Dfs Traverse | 8/28 |
(Reference: https://leetcode.com/problems/flatten-binary-tree-to-linked-list/discuss/36977/My-short-post-order-traversal-Java-solution-for-share)
Solution | Date |
---|---|
PostOrder | 8/29 |
Solution | Date |
---|---|
Traverse | 9/1 |
Solution | Date |
---|---|
Bfs | 9/1 |
Dfs | 9/1 |
Solution | Date |
---|---|
Dfs | 9/1 |
Bfs |
Solution | Date |
---|---|
Count Left Elements | 9/1 |
(Other Solutions, Reference: https://leetcode.com/problems/kth-smallest-element-in-a-bst/discuss/63660/3-ways-implemented-in-JAVA-(Python):-Binary-Search-in-order-iterative-and-recursive)
Solution | Date |
---|---|
Dfs Inorder | 9/1 |
Solution | Date |
---|---|
Check Left Right | 9/1 |
Solution | Date |
---|---|
Recursive | 9/3 |
(Other Solutions, Reference: https://leetcode.com/articles/binary-tree-inorder-traversal/)
Solution | Date |
---|---|
Iterative | 9/3 |
Solution | Date |
---|---|
Hash map | 9/3 |
(Reference: https://leetcode.com/problems/find-the-closest-palindrome/discuss/102396/C++-short-solution-only-need-to-compare-5-numbers)
Solution | Date |
---|---|
Find Candidates | 9/3 |
(Other Solutions, Reference: https://leetcode.com/problems/find-the-closest-palindrome/solution/)
Solution | Date |
---|---|
Using Math |
(Reference: https://leetcode.com/problems/validate-binary-search-tree/discuss/32112/Learn-one-iterative-inorder-traversal-apply-it-to-multiple-tree-questions-(Java-Solution)?page=2)
Solution | Date |
---|---|
Iter | 9/3 |
(Reference: https://leetcode.com/problems/closest-binary-search-tree-value-ii/discuss/70499/Java-5ms-iterative-following-hint-O(klogn)-time-and-space)
Solution | Date |
---|---|
Two Stack | 9/4 |
Solution | Date |
---|---|
Backtracking | 9/4 |
Solution | Date |
---|---|
Backtracking | 9/4 |
Solution | Date |
---|---|
Backtracking | 9/4 |
Solution | Date |
---|---|
Backtracking | 9/4 |
Iterative |
Solution | Date |
---|---|
Backtracking (TLE) | 9/4 |
Solution | Date |
---|---|
Map | 9/7 |
Two Pointers |
(Todo: https://leetcode.com/problems/word-break/solution/)
(Todo: https://leetcode.com/problems/word-break-ii/solution/)
Solution | Date |
---|---|
Find Pivot | 9/9 |
(Other Solutions, Reference: https://leetcode.com/problems/search-in-rotated-sorted-array-ii/discuss/28218/My-8ms-C++-solution-(o(logn)-on-average-o(n)-worst-case))
Solution | Date |
---|---|
One loop |
(Todo: https://leetcode.com/problems/wildcard-matching/discuss/17810/Linear-runtime-and-constant-space-solution)
(Todo: https://leetcode.com/problems/wildcard-matching/discuss/17957/C++-DP-solution)
Solution | Date |
---|---|
Dp |
Solution | Date |
---|---|
Dfs | 9/9 |
(Other Solutions, Reference: https://leetcode.com/problems/n-queens/discuss/19808/Accepted-4ms-c++-solution-use-backtracking-and-bitmask-easy-understand.)
Solution | Date |
---|---|
Bitmask |
(Other Solutions, Reference: https://leetcode.com/problems/n-queens-ii/discuss/20058/Accepted-Java-Solution?page=1)
Solution | Date |
---|---|
No place grid |
Solution | Date |
---|---|
Dfs | 9/9 |
Solution | Date |
---|---|
Two Map | 9/10 |
Solution | Date |
---|---|
Two Pointers | 9/11 |
Solution | Date |
---|---|
Dp | 9/11 |
Solution | Date |
---|---|
Bfs | 9/11 |
Recursive |
Solution | Date |
---|---|
Stack | 9/12 |
Recursive |
Solution | Date |
---|---|
DP | 9/13 |
Solution | Date |
---|---|
Bin search | 9/16 |
One Sorted | 9/16 |
Row then Col | 9/16 |
Solution | Date |
---|---|
Row then Col | 9/16 |
Solution | Date |
---|---|
Two Pointers | 9/16 |
Solution | Date |
---|---|
Two Pointers | 9/16 |
Solution | Date |
---|---|
Bfs | 9/21 |
Solution | Date |
---|---|
Dfs | 9/22 |
Solution | Date |
---|---|
Bin search | 9/23 |
Solution | Date |
---|---|
Recursive | 9/24 |
Iter |
Solution | Date |
---|---|
Recursive | 9/24 |
Iter |
Solution | Date |
---|---|
Dfs | 9/29 |
DP |
Solution | Date |
---|---|
Bfs | 10/13 |
Dfs | 10/13 |
Solution | Date |
---|---|
1/9 |
Solution | Date |
---|---|
1/9 |
Solution | Date |
---|---|
1/9 |
Solution | Date |
---|---|
1/9 |
Solution | Date |
---|---|
1/9 |
Solution | Date |
---|---|
DFS | 1/9 |
Iterative | 1/9 |