Algorithm interview note
Introduction
Data Structure
ArrayList VS LinkedList
Priority Queue
hashSet
Min Stack
Implement Queue by Two Stacks
Rehashing
LRU Cache
longest consecutive sequence
subarray sum
Two Strings Are Anagrams
largest rectangle in histogram
Heapify
Two Pointers
Binary Search
Search for a Range
Search Insert Position
First Bad version
Search in Rotated sorted Array
Find Minimum in Rotated Sorted Array
Remove Duplicates from Sorted Array
Merge Sorted Array
Rotate String
Reverse Words in a String
Recover rotated sorted array
Binary Tree
DFS template
Maximum Depth of Binary Tree
Balanced Binary Tree
Binary Tree Maximum Path Sum
Lowest Common Ancestor
BFS template
Binary Tree Level Order Traverse
Binary Tree Level Order Traversal II
Binary Tree Zigzag level Order Traversal
Validate Binary Search Tree
Insert Node in a Binary Search Tree
Search Range in Binary Search Tree
LinkedList
Remove Duplicates from Sorted List
Reverse Linked List
Reverse LinkedLIst II
Partition List
Sort List using merge sort
Reorder List
Linked List Cycle
Merge k Sorted Lists
Copy List with Random Pointer
Convert Sorted List to Balanced BST
Dynamic programing
Backpack
N Queen Problem
Search a 2D Matrix
Search a 2D Matrix II
Triangle
minimum path sum
Unique Paths
climbing stair
Jump Game
Jump Game II
Palindrome Partitioning II
longest increasing subsequence
Sort
Graph and Search
CloneGraph
Permutations
subsets
Topological Sorting
Palindrome Partitioning
Combination Sum
word ladder
largest rectangle in histogram
Powered by
GitBook
Combination Sum
Combination Sum
因为可以重复取,每一次都可以从上一层选的数开始数.但重复的数必须跳过
Combination Sum II
因为不可以重复取,每一次从上一层的下一个数开始数.同样重复的数必须跳过,但是不同层可以取相同的数
backtracking 用 linkedlist( the time complexity of Remove the last element is O(1))
results matching "
"
No results matching "
"