001 |
Two Sum |
solution |
C++ |
Java |
|
|
|
|
|
|
|
003 |
Longest-Substring-Without-Repeating-Characters |
solution |
C++ |
Java |
|
|
|
|
|
|
|
014 |
Longest Common Prefix |
[无] |
C++ |
|
|
015 |
3Sum |
[无] |
C++ |
|
|
|
|
|
|
|
|
017 |
Letter Combinations of a Phone Number |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
019 |
Remove Nth Node From End of List |
solution |
C++ |
Java |
|
020 |
Valid Parentheses |
[无] |
C++ |
Java |
|
021 |
Merge Two Sorted Lists |
solution |
C++ |
|
|
|
|
|
|
|
|
023 |
Merge k Sorted Lists |
solution |
C++ |
|
|
024 |
Swap Nodes in Pairs |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
027 |
Remove Element |
solution |
C++ |
|
|
028 |
Implement strStr() |
[无] [缺:KMP等高级字符串匹配算法] |
C++ |
|
|
|
|
|
|
|
|
033 |
Search in Rotated Sorted Array |
[无] |
C++ |
|
|
034 |
Search for a Range |
solution |
C++ |
|
|
|
|
|
|
|
|
039 |
Combination Sum |
[无] |
C++ |
|
|
040 |
Combination Sum II |
[无] |
C++ |
|
|
|
|
|
|
|
|
046 |
Permutations |
[缺:排列算法整理] |
C++ |
Java |
|
047 |
Permutations II |
[无] |
C++ |
|
|
|
|
|
|
|
|
051 |
N-Queens |
[缺:N皇后问题整理] |
C++ |
Java |
|
|
|
|
|
|
|
054 |
Spiral Matrix |
solution |
C++ |
|
|
|
|
|
|
|
|
056 |
Merge Intervals |
solution |
C++ |
|
|
|
|
|
|
|
|
059 |
Spiral Matrix II |
[无] |
C++ |
|
|
|
|
|
|
|
|
061 |
Rotate List |
[无] |
C++ |
|
|
|
|
|
|
|
|
064 |
Minimum Path Sum |
solution |
C++ |
Java |
|
|
|
|
|
|
|
066 |
Plus One |
[无] |
C++ |
|
|
067 |
Add Binary |
[无] |
C++ |
|
|
|
|
|
|
|
|
069 |
Sqrt(x) |
[无] |
C++ |
|
|
070 |
Climbing Stairs |
solution |
C++ |
Java |
|
|
|
|
|
|
|
075 |
Sort Colors |
[无] |
C++ |
Java |
|
076 |
Minimum Window Substring |
[无] |
C++ |
|
|
077 |
Combinations |
[缺:组合算法整理] |
C++ |
Java |
|
|
|
|
|
|
|
079 |
Word Search |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
087 |
Scramble String |
[无] |
C++ |
|
|
088 |
Merge Sorted Array |
[无] |
C++ |
|
|
|
|
|
|
|
|
094 |
Binary Tree Inorder Traversal |
solution |
C++ |
Java |
|
|
|
|
|
|
|
098 |
Validate Binary Search Tree |
[无] |
C++ |
Java |
|
099 |
Recover Binary Search Tree |
[无] |
|
Java |
|
|
|
|
|
|
|
101 |
Symmetric Tree |
solution |
C++ |
|
|
102 |
Binary Tree Level Order Traversal |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
104 |
Maximum Depth of Binary Tree |
[无] |
C++ |
Java |
|
105 |
Construct Binary Tree from Preorder and Inorder Traversal |
[无] |
C++ |
|
|
106 |
Construct Binary Tree from Inorder and Postorder Traversal |
[无] |
C++ |
|
|
|
|
|
|
|
|
109 |
Convert Sorted List to Binary Search Tree |
[无] |
C++ |
|
|
|
|
|
|
|
|
111 |
Minimum Depth of Binary Tree |
[无] |
C++ |
|
|
112 |
Path Sum |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
115 |
Distinct Subsequences |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
118 |
Pascal's Triangle |
solution |
C++ |
|
|
|
|
|
|
|
|
120 |
Triangle |
[无] |
C++ |
|
|
121 |
Best Time to Buy and Sell Stock |
|
C++ |
|
|
122 |
Best Time to Buy and Sell Stock II |
|
C++ |
|
|
123 |
Best Time to Buy and Sell Stock III |
|
C++ |
|
|
|
|
|
|
|
|
125 |
Valid Palindrome |
[无] |
C++ |
|
|
126 |
Word Ladder II |
[无] [缺:双端搜索] |
C++ |
|
|
127 |
Word Ladder |
[无] |
C++ |
Java |
|
128 |
Longest Consecutive Sequence |
|
C++ |
|
|
|
|
|
|
|
|
136 |
Single Number |
solution |
C++ |
|
|
|
|
|
|
|
|
141 |
Linked List Cycle |
solution |
C++ |
|
|
142 |
Linked List Cycle II |
solution |
C++ |
|
|
|
|
|
|
|
|
144 |
Binary Tree Preorder Traversal |
[无] |
C++ |
Java |
|
145 |
Binary Tree Postorder Traversal |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
149 |
Max Points on a Line |
[无] |
C++ |
|
|
|
|
|
|
|
|
249 |
Max Points on a Line |
[无] |
C++ |
|
|
|
|
|
|
|
|
155 |
Min Stack |
[无] |
C++ |
|
|
|
|
|
|
|
|
167 |
Two Sum II - Input array is sorted |
solution |
C++ |
Java |
|
|
|
|
|
|
|
169 |
Majority Element |
solution |
C++ |
|
|
|
|
|
|
|
|
173 |
Binary Search Tree Iterator |
[无] [缺:Morris遍历] |
C++ |
|
|
|
|
|
|
|
|
188 |
Best-Time-to-Buy-and-Sell-Stock-IV |
|
C++ |
|
|
|
|
|
|
|
|
198 |
House Robber |
solution |
C++ |
Java |
|
|
|
|
|
|
|
200 |
Number of Islands |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
202 |
Happy Number |
[无] |
C++ |
|
|
203 |
Remove Linked List Elements |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
205 |
Isomorphic Strings |
[无] |
C++ |
|
|
206 |
Reverse Linked List |
solution |
C++ |
Java |
|
|
|
|
|
|
|
208 |
Implement Trie (Prefix Tree) |
solution |
C++ |
|
|
209 |
Minimum Size Subarray Sum |
solution |
C++ |
Java |
|
|
|
|
|
|
|
211 |
Add and Search Word - Data structure design |
[无] |
C++ |
|
|
|
|
|
|
|
|
213 |
House Robber II |
[无] |
C++ |
|
|
|
|
|
|
|
|
215 |
Kth Largest Element in an Array |
[无] |
C++ |
|
|
216 |
Combination Sum III |
[无] |
C++ |
|
|
217 |
Contains Duplicate |
[无] |
C++ |
|
|
218 |
The Skyline Problem |
|
C++ |
|
|
219 |
Contains Duplicate II |
solution |
C++ |
Java |
|
220 |
Contains Duplicate III |
solution |
C++ |
Java |
|
|
|
|
|
|
|
226 |
Invert Binary Tree |
solution |
C++ |
Java |
|
|
|
|
|
|
|
232 |
Implement Queue using Stacks |
solution |
C++ |
|
|
|
|
|
|
|
|
234 |
Palindrome Linked List |
[无] |
C++ |
|
|
235 |
Lowest Common Ancestor of a Binary Search Tree |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
237 |
Delete Node in a Linked List |
solution |
C++ |
Java |
|
|
|
|
|
|
|
239 |
Sliding Window Maximum |
[无] |
C++ |
|
|
|
|
|
|
|
|
250 |
Count Univalue Subtrees |
[无] |
C++ |
|
|
|
|
|
|
|
|
254 |
Factor Combinations |
[无] |
C++ |
|
|
|
|
|
|
|
|
257 |
Binary Tree Paths |
[缺:非递归算法] |
C++ |
Java |
|
|
|
|
|
|
|
268 |
Missing Number |
solution |
C++ |
|
|
|
|
|
|
|
|
279 |
Perfect Squares |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
283 |
Move Zeroes |
solution |
C++ |
Java |
|
|
|
|
|
|
|
287 |
Find the Duplicate Number |
|
C++ |
|
|
|
|
|
|
|
|
290 |
Word Pattern |
[无] |
C++ |
|
|
|
|
|
|
|
|
300 |
Longest Increasing Subsequence |
solution |
C++ |
Java |
|
|
|
|
|
|
|
303 |
Range Sum Query - Immutable |
|
C++ |
|
|
|
|
|
|
|
|
307 |
Range Sum Query - Mutable |
[缺:BIT] |
C++ |
|
|
308 |
Range Sum Query 2D - Mutable |
|
C++ |
|
|
309 |
Best Time to Buy and Sell Stock with Cooldown |
|
C++ |
|
|
|
|
|
|
|
|
319 |
Bulb Switcher |
[无] |
C++ |
|
|
|
|
|
|
|
|
322 |
Coin Change |
solution |
C++ |
|
|
|
|
|
|
|
|
337 |
House Robber III |
[无] |
C++ |
|
|
|
|
|
|
|
|
343 |
Integer Break |
[无] |
C++ |
Java |
|
344 |
Reverse String |
[无] |
C++ |
|
|
|
|
|
|
|
|
347 |
Top K Frequent Elements |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
349 |
Intersection of Two Arrays |
[无] |
C++ |
Java |
|
350 |
Intersection of Two Arrays II |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
370 |
Range Addition |
|
C++ |
|
|
|
|
|
|
|
|
374 |
Guess Number Higher or Lower |
solution |
C++ |
|
|
|
|
|
|
|
|
377 |
Combination Sum IV |
[无] |
C++ |
|
|
|
|
|
|
|
|
384 |
Shuffle an Array |
solution |
C++ |
|
|
|
|
|
|
|
|
386 |
Lexicographical Numbers |
|
C++ |
|
|
387 |
First Unique Character in a String |
|
C++ |
Java |
|
388 |
Longest Absolute File Path |
|
C++ |
|
|
389 |
Find the Difference |
|
C++ |
|
|
390 |
Elimination Game |
|
C++ |
|
|
391 |
Perfect Rectangle |
[缺:矩形求交] |
C++ |
|
|
|
|
|
|
|
|
416 |
Partition Equal Subset Sum |
[无] |
C++ |
Java |
|
417 |
Pacific Atlantic Water Flow |
[无] |
|
Java |
|
|
|
|
|
|
|
434 |
Number of Segments in a String |
|
C++ |
|
|
435 |
Non-overlapping Intervals |
solution |
C++ |
Java |
|
|
|
|
|
|
|
437 |
Path Sum III |
[无] |
C++ |
Java |
|
438 |
Find All Anagrams in a String |
[无] |
C++ |
|
|
|
|
|
|
|
|
443 |
String Compression |
|
C++ |
|
|
|
|
|
|
|
|
447 |
Number of Boomerangs |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
454 |
4Sum II |
[无] |
C++ |
Java |
|
455 |
Assign Cookies |
[无] |
C++ |
Java |
|
|
|
|
|
|
|
485 |
Max Consecutive Ones |
[无] |
C++ |
|
|
|
|
|
|
|
|
498 |
Diagonal Traverse |
[无] |
C++ |
|
|
|
|
|
|
|
|
518 |
Coin Change 2 |
[无] |
C++ |
|
|
|
|
|
|
|
|
530 |
Minimum Absolute Difference in BST |
[无] |
|
Java |
|
|
|
|
|
|
|
541 |
Reverse String II |
solution |
C++ |
|
|
|
|
|
|
|
|
561 |
Array Partition I |
solution |
C++ |
|
|
|
|
|
|
|
|
583 |
Delete Operation for Two Strings |
solution |
C++ |
|
|
|
|
|
|
|
|
598 |
Range Addition II |
|
C++ |
|
|
599 |
Minimum Index Sum of Two Lists |
solution |
C++ |
|
|
600 |
Non-negative Integers without Consecutive Ones |
solution [缺:Bit Manipulation] |
C++ |
|
|
|
|
|
|
|
|
637 |
Average of Levels in Binary Tree |
solution |
C++ |
|
|
|
|
|
|
|
|
648 |
Replace Words |
[无] |
C++ |
|
|
|
|
|
|
|
|
672 |
Bulb Switcher II |
solution |
C++ |
|
|
673 |
Number of Longest Increasing Subsequence |
[缺:BIT;线段树] |
C++ |
|
|
674 |
Longest Continuous Increasing Subsequence |
|
C++ |
|
|
675 |
Cut Off Trees for Golf Event |
[缺:A*;Hadlock's Algo] |
C++ |
|
|
676 |
Implement Magic Dictionary |
solution |
C++ |
|
|
677 |
Map Sum Pairs |
solution |
C++ |
|
|
|
|
|
|
|
|
684 |
Redundant Connection |
solution |
C++ |
|
|
685 |
Redundant Connection II |
solution |
C++ |
|
|
|
|
|
|
|
|
690 |
Employee Importance |
solution |
C++ |
|
|
|
|
|
|
|
|
692 |
Top K Frequent Words |
solution |
C++ |
|
|
|
|
|
|
|
|
694 |
Number of Distinct Islands |
[review: hash的方式] |
C++ |
|
|
695 |
Max-Area-of-Island |
|
C++ |
|
|
696 |
Count Binary Substrings |
|
C++ |
|
|
697 |
Degree of an Array |
|
C++ |
|
|
698 |
Partition to K Equal Sum Subsets |
|
C++ |
Java |
|
699 |
Falling Squares |
[缺:线段树;块状链表] |
C++ |
|
|
|
|
|
|
|
|
711 |
Number of Distinct Islands II |
[review: hash的方式] |
C++ |
|
|
712 |
Minimum ASCII Delete Sum for Two Strings |
|
C++ |
|
|
713 |
Subarray Product Less Than K |
|
C++ |
|
|
714 |
Best Time to Buy and Sell Stock with Transaction Fee |
|
C++ |
|
|
715 |
Range Module |
[缺:set查找] |
C++ |
|
|
716 |
Max Stack |
solution |
C++ |
|
|
717 |
1-bit and 2-bit Characters |
|
C++ |
|
|
718 |
Maximum Length of Repeated Subarray |
[缺:Rolling Hash] |
C++ |
|
|
719 |
Find K-th Smallest Pair Distance |
[缺:二分搜索] |
C++ |
|
|
720 |
Longest Word in Dictionary |
solution |
C++ |
|
|
721 |
Accounts Merge |
solution |
C++ |
|
|
722 |
Remove Comments |
solution |
C++ |
|
|
723 |
Candy Crush |
solution |
C++ |
|
|
724 |
Find Pivot Index |
solution |
C++ |
|
|
725 |
Split Linked List in Parts |
solution |
C++ |
|
|
|
|
|
|
|
|
727 |
Minimum Window Subsequence |
solution |
C++ |
|
|
728 |
Self Dividing Numbers |
solution |
C++ |
|
|
729 |
My Calendar I |
solution |
C++ |
|
|
|
|
|
|
|
|
731 |
My Calendar II |
solution |
C++ |
|
|
732 |
My Calendar III |
solution |
C++ |
|
|
733 |
Flood Fill |
solution |
C++ |
|
|
734 |
Sentence Similarity |
solution |
C++ |
|
|
735 |
Asteroid Collision |
solution |
C++ |
|
|
736 |
Parse Lisp Expression |
solution |
C++ |
|
|
737 |
Sentence Similarity II |
solution |
C++ |
|
|
|
|
|
|
|
|
740 |
Delete and Earn |
solution |
C++ |
|
|
741 |
Cherry Pickup |
solution [缺:自底向上的动态规划] |
C++ |
|
|
|
|
|
|
|
|
747 |
Largest Number At Least Twice of Others |
solution |
C++ |
|
|
|
|
|
|
|
|
765 |
Couples Holding Hands |
solution |
C++ |
|
|
766 |
Toeplitz Matrix |
solution |
C++ |
|
|
780 |
Reaching Points |
solution |
C++ |
|
|
781 |
Rabbits in Forest |
solution |
C++ |
|
|
|
|
|
|
|
|
783 |
Minimum Distance Between BST Nodes |
solution |
C++ |
|
|
784 |
Letter Case Permutation |
solution |
C++ |
|
|
785 |
Is Graph Bipartite? |
solution |
C++ |
|
|
786 |
K-th Smallest Prime Fraction |
solution [缺:分治算法] |
C++ |
|
|
787 |
Cheapest Flights Within K Stops |
solution [缺:使用Heap] |
C++ |
|
|
788 |
Rotated Digits |
solution |
C++ |
|
|
789 |
Escape The Ghosts |
solution |
C++ |
|
|
790 |
Domino and Tromino Tiling |
solution [缺:转移矩阵求幂解法] |
C++ |
|
|
791 |
Custom Sort String |
solution |
C++ |
|
|
792 |
Number of Matching Subsequences |
solution |
C++ |
|
|
793 |
Preimage Size of Factorial Zeroes Function |
solution |
C++ |
|
|
794 |
Valid Tic-Tac-Toe State |
solution |
C++ |
|
|
795 |
Number of Subarrays with Bounded Maximum |
solution |
C++ |
|
|
796 |
Rotate String |
solution [缺:Rolling Hash] |
C++ |
|
|
797 |
All Paths From Source to Target |
solution |
C++ |
|
|
|
|
|
|
|
|
799 |
Champagne Tower |
solution |
C++ |
|
|
800 |
Similar RGB Color |
solution |
C++ |
|
|
|
|
|
|
|
|
804 |
Unique Morse Code Words |
solution |
C++ |
|
|
805 |
Split Array With Same Average |
solution |
C++ |
|
|
806 |
Number of Lines To Write String |
solution |
C++ |
|
|
807 |
Max Increase to Keep City Skyline |
solution |
C++ |
|
|
|
|
|
|
|
|
809 |
Expressive Words |
solution |
C++ |
|
|
|
|
|
|
|
|
811 |
Subdomain Visit Count |
solution |
C++ |
|
|
|
|
|
|
|
|
817 |
Linked List Components |
solution |
C++ |
|
|
|
|
|
|
|
|
819 |
Most Common Word |
solution |
C++ |
|
|
|
|
|
|
|
|
852 |
Peak Index in a Mountain Array |
solution |
C++ |
|
|
853 |
Car Fleet |
solution |
C++ |
|
|
854 |
K-Similar Strings |
solution |
C++ |
|
|
855 |
Exam Room |
solution |
C++ |
|
|
856 |
Score of Parentheses |
solution |
C++ |
|
|
857 |
Minimum Cost to Hire K Workers |
solution |
C++ |
|
|
858 |
Mirror Reflection |
solution |
C++ |
|
|
859 |
Buddy Strings |
solution |
C++ |
|
|
860 |
Lemonade Change |
solution |
C++ |
|
|
861 |
Score After Flipping Matrix |
solution |
C++ |
|
|
|
|
|
|
|
|
863 |
All Nodes Distance K in Binary Tree |
solution |
C++ |
|
|