Tuesday, December 3, 2013

[Leetcode] DFS problems

Letter Combinations of a Phone Number
3
3
    1. string
    1. dfs
Generate Parentheses
3
4
    1. string
    1. dfs
Sudoku Solver
4
2
    1. array
    1. dfs
N-Queens
4
3
    1. array
    1. dfs
N-Queens II
4
3
    1. array
    1. dfs
Word Search
3
4
    1. array
    1. dfs
Restore IP Addresses
3
3
    1. string
    1. dfs
Unique Binary Search Trees II
4
1
    1. tree
    1. dp
    1. dfs
Validate Binary Search Tree
3
5
    1. tree
    1. dfs
Recover Binary Search Tree
4
2
    1. tree
    1. dfs
Same Tree
1
1
    1. tree
    1. dfs
Symmetric Tree
1
2
    1. tree
    1. dfs
Maximum Depth of Binary Tree
1
1
    1. tree
    1. dfs
Construct Binary Tree from Preorder and Inorder Tr
3
3
    1. array
    2. tree
    1. dfs
Construct Binary Tree from Inorder and Postorder T
3
3
    1. array
    2. tree
    1. dfs
Convert Sorted Array to Binary Search Tree
2
3
    1. tree
    1. dfs
Balanced Binary Tree
1
2
    1. tree
    1. dfs
Minimum Depth of Binary Tree
1
1
    1. tree
    1. dfs
Path Sum
1
3
    1. tree
    1. dfs
Path Sum II
2
2
    1. tree
    1. dfs
Populating Next Right Pointers in Each Node
3
3
    1. tree
    1. dfs
Populating Next Right Pointers in Each Node II
4
2
    1. tree
    1. dfs
Binary Tree Maximum Path Sum
4
2
    1. tree
    1. dfs
Sum Root to Leaf Numbers
2
4
    1. tree
    1. dfs
Surrounded Regions
4
3
    1. array
    1. bfs
    1. dfs
Palindrome Partitioning
3
4
    1. string
    1. dfs

[Leetcode] DP problems

Regular Expression Matching
5
3
    1. string
    1. recursion
    2. dp
Longest Valid Parentheses
4
1
    1. string
    1. dp
Wildcard Matching
5
3
    1. string
    1. recursion
    2. dp
    3. greedy
Maximum Subarray
3
3
    1. array
    1. dp
Unique Paths
2
3
    1. array
    1. dp
Unique Paths II
3
3
    1. array
    1. dp
Minimum Path Sum
3
3
    1. array
    1. dp
Climbing Stairs
2
5

    1. dp
Edit Distance
4
3
    1. string
    1. dp
Maximal Rectangle
5
1
    1. array
    1. dp
    2. stack
Scramble String
5
2
    1. string
    1. recursion
    2. dp
Decode Ways
3
4
    1. string
    1. recursion
    2. dp
Unique Binary Search Trees II
4
1
    1. tree
    1. dp
    2. dfs
Unique Binary Search Trees
3
1
    1. tree
    1. dp
Interleaving String
5
2
    1. string
    1. recursion
    2. dp
Distinct Subsequences
4
2
    1. string
    1. dp
Triangle
3
1
    1. array
    1. dp
Best Time to Buy and Sell Stock
2
1
    1. array
    1. dp
Best Time to Buy and Sell Stock III
4
1
    1. array
    1. dp
Palindrome Partitioning II
4
3
    1. string
    1. dp