All my Leetcode answer, but removing all easy questions.
[toc]
- Number of Island
- Clone Graph
- Binary Tree Right Side View
- Find Bottom Left Tree Value
- Binary Tree Zigzag Level Order Traversal
- Is Graph Bipartite
- Possible Bipartition
- Check Completeness of a Binary Tree
- The Maze
2. Graph
- Find First and Last Position of Element in Sorted Array
- Find Minimum in Rotated Sorted Array
- Find Minimum in Rotated Sorted Array II
- Median of Two Sorted Array
- Search in Rotated Sorted Array
- Search in Rotated Sorted Array II
- Search in a Sorted Array of Unknown Size
- Search a 2D Matrix
- Find K Closest Elements
- Best Time to Buy and Sell Stock III
- Best Time to Buy and Sell Stock IV
- Decode Ways
- Decode Ways II
- Dungeon Game
- Find the Derangement of An Array
- kadane algorithm
- Maximum Product Subarray
- Palindrome Partitioning II
- Unique Binary Search Trees
- Palindromic Substrings
- Coin Change
- Word Break
- Stone Game
Double Sequence Problem (双序列)
Knapsack Problem (背包问题)
---Summarize
Binary Lifting for LCA(lowest common ancestor)
---Concept, Video
- Best Time to Buy and Sell Stock
- Best Time to Buy and Sell Stock II
- Container with Most Water
- Gas Station
- Partition Labels
- Trapping Rain Water
- Jump Game
- Jump Game
- Manacher - Longest Palindromic Substring
- KMP(Unfinished)
7. Math
- Excel Sheet Column Title
- Excel Sheet Column Number
- Number Of 1 Bites
- Pow
- Rotate Array
- Divide Two Integers
- Multiply Strings
- Permutation Sequence
- Next Permutation
- Fibonacci Number
- mutiply string
- Largest Time for Given Digits
- Add Binary
- Maximum Product of Word Lengths
- Reverse Integer
- Remove Duplicates from Sorted Array
- Remove Duplicates from Sorted Array II
- Missing Ranges
- One Edit Distance
- Three Sum
- Three Sum Closest
- Three Sum Multiplicity
- Valid Palindrome
- Valid Palindrome II
- Remove Nth Node From End of List
- Remove Element
- 4Sum
- 4Sum II
- two sum II Input Array Is Sorted
- Longest Substring Without Repeating Characters
- Minimum Window Substring
- Minimum Window Substring II
- Continuous Subarray Sum
- Minimum Size Subarray Sum
- Subarray Product Less Than K
- Permutation in String
- Find All Anagrams in a String
- Number of Subarrays with Bounded Maximum
- Binary Subarrays With Sum
- Maximum Subarray
- Subarray Sum Equals K
- Maximum Product Subarray
- Contiguous Array
- Find Pivot Index
- Range Sum Query 2D Immutable
- Can Make Palindrome from Substring
10. Recursion/DFS
combine:
- Subsets
- Subsets II
- Factor Combinations - hard to think
Permutations:
Recursion:
- Construct Binary Tree from Inorder and Postorder Traversal
- Construct Binary Tree from Preorder and Inorder Traversal
- Convert Sorted Array to Binary Search Tree
- Convert Sorted List to Binary Search Tree
- Convert BST to Greater Tree
- Combination Sum II
- Flip Equivalent Binary Trees
- Four Sum
- Letter Combinations of a Phone Number
- Path Sum
- Path Sum II
- Path Sum III
- Palindrome Partitioning
- Populating Next Right Pointers in Each Node
- Populating Next Right Pointers in Each Node II
- Surrounded Regions
- Symmetric Tree
- Generate Parentheses
- Sudoku Solver
- Reorder Routes to Make All Paths Lead to the City Zero
- Restore IP Addresses
- Combination Sum
- N Queens
- Lowest Common Ancestor of a Binary Tree
- Inorder Successor In BST
- Inorder Successor In BST II
- word search
- Binary Tree Right Side View
- Binary Tree Pruning
- Sum Root to Leaf Numbers
- Increasing Order Search Tree
- Binary Tree Maximum Path Sum
- Validate Binary Search Tree
- Invert Binary Tree
- Count Number of Maximum Bitwise-OR Subsets
- Lowest Common Ancestor of a Binary Tree
- Longest Consecutive Sequence
- Count Binary Substrings
- Find All Duplicates in an Array
- Max Points on A Line
- Next Greater Element III
- Set Mismatch
- Sliding Window Maximum
- ZigZag Conversion
- Merge k Sorted Lists
- Interval
- Longest Valid Parentheses
- Substring with Concatenation of All Words(Unfinished)
- Valid Sudoku
- Rotate Image
- Rotate Array
- Spiral Matrix
- Spiral Matrix II
- Queue Reconstruction by Height
- First Missing Positive
- Group Anagrams
- Text Justification
- Reaching Point
- Verifying an Alien Dictionary
- Contains Duplicate III
- Search a 2D Matrix
- Search a 2D Matrix II
- Pour Water
- Orderly Queue
- K-th Smallest in Lexicographical Order
- Kth Smallest Element in a Sorted Matrix
- Merge Sorted Array
- Asteroid Collision
- Decode String
- Evaluate Reverse Polish Notation
- Implement Queue using Stacks
- Implement Stack using Queues
- Reverse Words in a String
- Reverse Words in a String II
- Traverse a tree by preOrder, inOrder, postOrder
- Valid Parentheses
- [Shunting-yard Algorithm]
- Next Greater Element
- Next Greater Element II
- Largest Rectangle in Histogram
- Maximal Rectangle
- Daily Temperatures
13. LinkedList
- Swap Nodes in Pairs
- Reverse Linked List
- Reverse Linked List II
- Reverse Nodes in k Group
- Merge k Sorted Lists
- copy list with random pointer
- sort list
- insertion sort list
- Remove Nth Node From End of List
- Intersection of Two Linked Lists
- Reorder List
- Linked List Cycle II
- Flatten a Multilevel Doubly Linked List
- Palindrome Linked List
- Insert into a Sorted Circular Linked List
- Remove Duplicates from Sorted List II
- Maximum Frequency Stack
- LRU Cache
- Implement Queue by Two Stacks
- Peeking Iterator
- Insert Delete GetRandom O(1)
- Complete Binary Tree Inserter
- Find Median from Data Stream
- Sliding Window Median
- Min Stack
- Implement Deque with Stacks
15. Sort
- Kth Largest Element in an Array
- Quick Sort Linked List
- Sort a Stack Using A Temporary Stack
- Sort Colors
- Top K Frequent Elements
16. Heap
17. Trie
- Binary Search Tree Iterator
- Validate Binary Search Tree
- Inorder Successor In BST
- Inorder Successor In BST II
- Recover Binary Search Tree
- Convert Sorted Array to Binary Search Tree
- Convert Sorted List to Binary Search Tree
- Unique Binary Search Trees II
The first question is too easy, so not show it.