Questions |
Data Structure&Algorithms | Language |
Length of Last Word | Strings | Java, c++ |
Substring with Concatenation of All Words | Map, substring() | Java, c++ |
Minimum Window Substring | Greedy, Map | Java, c++ |
Longest Substring Without Repeating Characters | Greedy, Map | Java, c++ |
Longest Palindromic Substring | string, DP | Java, c++ |
Longest Common Prefix | Strings | Java, c++ |
Interleaving String | DP | Java, c++ |
Implement strStr() | string, indexof(), kmp | Java, c++ |
String to Integer (atoi) | Strings | Java, c++ |
Multiply Strings | string, multiple | Java, c++ |
Reverse Words in a String | string, split() | Java, c++ |
Path Sum | Recursion | Java, c++ |
Path Sum II | stack, Recursion | Java, c++ |
Same Tree | tree, Recursion | Java, c++ |
Unique Binary Search Trees | DP, | Java, c++ |
Unique Binary Search Trees II | Recursion | Java, c++ |
Convert Sorted List to Binary Search Tree | Recursion | Java, c++ |
Convert Sorted Array to Binary Search Tree | Recursion | Java, c++ |
Binary Tree Level Order Traversal | BFS | Java, c++ |
Binary Tree Inorder Traversal | Recursion, Iterative(Stack) | Java, c++ |
Symmetric Tree | Recursion | Java, c++ |
Recover Binary Search Tree | Recursion | Java, c++ |
Validate Binary Search Tree | Recursion | Java, c++ |
Binary Tree Zigzag Level Order Traversal | Recursion | Java, c++ |
Maximum Depth of Binary Tree | Recursion | Java, c++ |
Construct Binary Tree from Preorder and Inorder Traversal | Recursion | Java, c++ |
Construct Binary Tree from Inorder and Postorder Traversal | Recursion | Java, c++ |
Balanced Binary Tree | Recursion | Java, c++ |
Minimum Depth of Binary Tree | Recursion, Iterative | Java, c++ |
Flatten Binary Tree to Linked List | 遍历应用 | Java, c++ |
Binary Tree Maximum Path Sum | Recursion | Java, c++ |
Binary Tree Preorder Traversal | Recursion, Iterative | Java, c++ |
Binary Tree Postorder Traversal | Recursion, Iterative | Java, c++ |
Remove Nth Node From End of List | two pointers | Java, c++ |
Merge k Sorted Lists | LinkedList, PriorityQueue | Java, c++ |
Rotate List | LinkedList | Java, c++ |
Merge Two Sorted Lists | two pointers | Java, c++ |
Remove Duplicates from Sorted List | two pointers | Java, c++ |
Remove Duplicates from Sorted List II | two pointers | Java, c++ |
Partition List | LinkedList, two pointers | Java, c++ |
Reverse Linked List II | two pointers | Java, c++ |
Copy List with Random Pointer | LinkedList | Java, c++ |
Linked List Cycle | two pointers | Java, c++ |
Linked List Cycle II | two pointers | Java, c++ |
Reorder List | LinkedList, rotate, insert | Java, c++ |
Insertion Sort List | LinkedList, insertion sort | Java, c++ |
Sort List | LinkedList, merge sort | Java, c++ |
Word Break | DP | Java, c++ |
Candy | array | Java, c++ |
Palindrome Partitioning II | DP | Java, c++ |
Longest Consecutive Sequence | hashmap | Java, c++ |
Climbing Stairs | math, DP | Java, c++ |
Best Time to Buy and Sell Stock | Greedy | Java, c++ |
Best Time to Buy and Sell Stock II | Greedy | Java, c++ |
Best Time to Buy and Sell Stock III | Greedy | Java, c++ |
Unique Paths | DP | Java, c++ |
Unique Paths II | DP | Java, c++ |
Triangle | DP | Java, c++ |
Minimum Path Sum | DP | Java, c++ |
Maximum Subarray | DP | Java, c++ |
Jump Game | Greedy | Java, c++ |
Jump Game II | Greedy | Java, c++ |
Edit distance | DP | Java, c++ |
Distinct Subsequences | DP | Java, c++ |
Two Sum | array, Hash | Java, c++ |
3Sum | array, two pointers | Java, c++ |
3Sum Closest | array, two pointers | Java, c++ |
4Sum | two pointers | Java, c++ |
Median of Two Sorted Arrays | 二分法,递归 | Java, c++ |
Add Two Numbers | math | Java, c++ |
ZigZag Conversion | string, math | Java, c++ |
Set Matrix Zeroes | array, matrix | Java, c++ |
Rotate Image | array, matrix | Java, c++ |
Spiral Matrix | array, matrix | Java, c++ |
Spiral Matrix2 | array, matrix | Java, c++ |
Search a 2D matrix | matrix | Java, c++ |
Palindrome Number | math, Recursion | Java, c++ |
Regular Expression Matching | string, recursion | c++ |
Container With Most Water | two-pointer | Java, c++ |
Trapping Rain Water | 细节实现 | Java, c++ |
Integer to Roman | Math | Java, c++ |
Roman to Integer | Math | Java, c++ |
Letter Combinations a Phone Number | 回溯 | Java, c++ |
Valid Parentheses | Stack | Java, c++ |
Generate Parentheses | Recursion | Java, c++ |
Swap Nodes in Pairs | Recursion | Java, c++ |
Reverse Nodes in k-Group | linklist | Java, c++ |
Remove Duplicates from Sorted Array | two pointers | Java, c++ |
Remove Element | array, two pointers | Java, c++ |
Divide Two Integers | math, bit operation | Java, c++ |
Next Permutation | math | Java, c++ |
Permutations | Recursion | Java, c++ |
Permutations II | Recursion | Java, c++ |
Permutations Sequence | math/ DFS | Java, c++ |
Longest Valid Parentheses | stack | Java, c++ |
Search in Rotated Sorted Array | Binary Search | Java, c++ |
Search for a Range | Binary Search | Java, c++ |
Search Insert Positin | Binary Search | Java, c++ |
Valid Sudoku | array, math | Java, c++ |
Sudoku Solver | math, 回溯 | Java, c++ |
Count and Say | string operation | Java, c++ |
Combination Sum | 回溯 | Java, c++ |
Combinations Sum II | 回溯 | Java, c++ |
First Missing Positive | array, bucket sort | Java, c++ |
Anagrams | string, hashmap | Java, c++ |
Pow(x,n) | 二分法,递归 | Java, c++ |
N-Queens | 回溯 | Java, c++ |
N-Queens II | 回溯 | Java, c++ |
Merge Intervals | math, comparator | Java, c++ |
Insert Interval | math, comparator | Java, c++ |
Add Binary | math | Java, c++ |
Valid Number | Math, reg expression | Java |
Plus One | math | Java, c++ |
Text Justification | string, 细节 | Java, c++ |
Sqrt(x) | binary search | Java, c++ |
Sort Colors | two pointer | Java, c++ |
Combinations | DFS | Java, c++ |
Subsets | DFS | Java, c++ |
Subsets II | DFS | Java, c++ |
Word Search | array, 标记数组 | Java, c++ |
Remove Duplicates from Sorted Array II | two pointers | Java, c++ |
Search in Rotated Sorted Array II | Binary Search | Java, c++ |
Largest Rectangle in Histogram | stack | Java, c++ |
Maximal Rectangle | stack | Java, c++ |
Merge Sorted Array | array, merge sort | Java, c++ |
Gray Code | math | Java, c++ |
Decode Ways | DP | Java, c++ |
Restore IP Address | Recursion | Java, c++ |
Binary Tree Level Order Traversal II | BFS | Java, c++ |
Populating Next Right Pointers in Each Node | BT | Java, c++ |
Populating Next Right Pointers in Each Node II | BT | Java, c++ |
Pascal's Triangle | math | Java, c++ |
Pascal's Triangle II | math, 滚动数组 | Java, c++ |
Valid Palindrome | string, two pointers | Java, c++ |
Word Ladder | dict | Java, c++ |
Sum Root to Leaf Numbers | Recursion | Java, c++ |
Surrounded Region | BFS | Java, c++ |
Clone Graph | Recursion | Java, c++ |
Gas Station | array | Java, c++ |
Single Number | XOR | Java, c++ |
Single Number II | bit manipulation | Java, c++ |
Word Break II | DFS | Java, c++ |
LRU Cache | Design Class | Java, c++ |
Max Points on a line | math | Java, c++ |
Evaluate Reverse Polish Notation | stack | Java, c++ |
Palindrome Partitioning | DFS | Java, c++ |
Scramble String | Recursion | Java, c++ |
Simplify Path | stack | Java, c++ |
Permutation Sequence | math | Java, c++ |
Wildcard Matching | string, greedy | Java, c++ |
Word Ladder II | BFS, Map | Java, c++ |
Reverse Integer | math | Java, c++ |
Maximum Product Subarray | greedy | Java, c++ |