I. Array and List
------I/1.Sort------
Merge Sorted Array
Sort Colors
Merge Two Sorted Lists
Merge k Sorted Lists
Longest Consecutive Sequence
Insertion Sort List
Sort List
------I/2.Adjust List------
Partition List
Reverse Linked List II
Rotate List
Reverse Nodes in k-Group
Swap Nodes in Pairs
Reorder List
Remove Element
Remove Duplicates from Sorted Array
Remove Duplicates from Sorted Array II
Remove Duplicates from Sorted List
Remove Duplicates from Sorted List II
------I/3.1Search(sorted: 二分法)------
Search Insert Position
Search for a Range
Convert Sorted List to Binary Search Tree
Convert Sorted Array to Binary Search Tree
Sqrt(x)
Median of Two Sorted Arrays
------I/3.2Search(unsorted)------
Candy
发帖水王 <编程之美>P130
------I/4.Two Pointers------
Valid Palindrome
Remove Nth Node From End of List
Linked List Cycle
Linked List Cycle II
------I/5.双向链表------
LRU Cache
------I/6.Shift------
通过逆序移位 <编程之美> P201
字符串通过连接来代替移位 P103
II. Queue &Stack
-----II/1.Queue-----
三个队列排序p195
实现带最大值查询的队列<编程之美> P239
-----II/2.Stack-----
Flatten Binary Tree to Linked List
Binary Tree Preorder Traversal
Binary Tree Postorder Traversal
Simplify Path
Valid Parentheses
Longest Valid Parentheses
Evaluate Reverse Polish Notation
Implementation Stack by Array
stack的实现(含min方法)p113
Hanoi
III. Tree
-----III/1.“递归”实现前序、中序、后序遍历------
Path Sum
Path Sum II
Sum Root to Leaf Numbers
Recover Binary Search Tree
Binary Tree Maximum Path Sum
Minimum Depth of Binary Tree
Maximum Depth of Binary Tree
Balanced Binary Tree
Unique Binary Search Trees
Unique Binary Search Trees II
Symmetric Tree
Construct Binary Tree from Preorder and Inorder Traversal
Construct Binary Tree from Inorder and Postorder Traversal
------III/2.“循环+栈”实现前序、中序、后序------
Flatten Binary Tree to Linked List(III)
-----III/3.level search(wfs)-----
Binary Tree Level Order Traversal II
Populating Next Right Pointers in Each Node
Populating Next Right Pointers in Each Node II
Word Ladder(set的使用)
IV. Graph
注意:对于不能重复遍历的情况,需要为每个节点标记是否已访问过。
------IV/1.遍历所有节点,两个for循环------
Pascal's Triangle
Pascal's Triangle II
Rotate Image
Search a 2D Matrix
------IV/2.设定遍历方向,按照该方向遍历------
Spiral Matrix
Spiral Matrix II
Zigzag Conversion
------IV/3.DFS------
Word Search
Set Matrix Zeroes
Clone Graph
Copy List with Random Pointer
Surrounded Regions
------IV/4.WFS------
Word Ladder II(unordered_map,map,set的使用)
最短路径 <编程之美>P90
------IV/5.Dynamic Programming------
Minimum Path Sum
Unique Path
Unique Path II
------IV/6.数据结构------
bfs在大数据时通过hash表代替node marking
稀疏矩阵的表示方法(链表、数组、三元组) <珠玑>p97p209
------IV/7.着色问题------
点图&区间图 <编程之美> P58-60
V. Hash table, map
Minimum Window Substring(map的遍历)
Anagrams
Substring with Concatenation of All Words
First Missing Positive
VI. recursion/ backtracking
Palindrome partitioning
Subsets
Subsets II
Combinations
Permutations
Permutations II
Next Permutation
Combination Sum
Combination Sum II
Letter Combinations of a Phone Number (string的删除)
4 Sum
3 Sum
3 Sum Closest
Two Sum
Generate Parentheses
Restore IP Addresses
Wildcard Matching
Regular Expression Matching(正则表达式)
N-Queens
N-Queens II
Sudoku Solver
Valid Sudoku(vector的assign函数)
***vector与string的拷贝
vector vcBuf;
string stBuf("Hello DaMao!!!");
vcBuf.resize(stBuf.size());
vcBuf.assign(stBuf.begin(), stBuf.end());
VII.
Maximum Subarray
Longest Substring Without Repeating Characters
Longest Common Prefix
Longest Palindromic Substring
Container With Most Water
Gas Station
Maximal Rectangle
Largest Rectangle in Histogram
Trapping Rain Water
Permutation Sequence(int->string转换)
Count and Say
Best Time to Buy and Sell Stock III
Best Time to Buy and Sell Stock
Best Time to Buy and Sell Stock II
Climbing Stairs
Jump Game II
Decode Ways
Palindrome partitioning II
Palindrome partitioning(VII)
Triangle
<编程之美> P44,191-193
Word Break
Word Break II
Interleaving String
Edit Distance
Distinct Subsequences
Scramble String
VIII.Greedy
Jump game
Max Points on a Line
IX.Divide and Conquer
Pow(x,n)
Divide Two Integers
X. Numerique analysis
Valid Number
Plus One
Add Two Numbers
Add Binary
Multiply Strings(vector转成string)
Roman to Integer
Integer to Roman
String to Integer(atoi)
Reverse Integer
Palindrome Number
XI. Project
Insert Interval
Merge Intervals
<编程之美>P50-51
XII. 查找
------字符串匹配-------
Implement strStr()
XIII. Bit Operation
Gray Code
Single Number
Single Number II
p95,p140, p141,p172
Permutations p173
Parenthesis p174
pennies p176
Queen 177
XIV. optimization<珠玑>
malloc的优化 <珠玑>p92
string连接的优化 p100
数据压缩 <珠玑>p100-101
哨兵(一元数组、链表、箱、BST)<珠玑>p137
随机数 <珠玑>p120(减少生成次数P125/9 未知np125/10)