(1) Sort List (leetcode 148)
(2) Reverse List in K group (leetcode 25) try both recursive and iterative
(3) Merge K sorted List (leetcode 23)
(4) Insertion Sort List (leetcode 147) also try merge sort, quick sort
(5) Summary Ranges (leetcode 228)
(6) Merge Intervals (leetcode 56), Insert Interval (leetcode 57)
(7) Spiral Matrix (leetcode 54) II (leetcode 59), Rotate Image (leetcode 48)
(8) Longest consecutive Sequence (leetcode 128)
(9) Game of life (leetcode 289)
(10) Missing range (leetcode 163)
(11) Missing Number (leetcode 268), find all duplicate (0 ~ n-1)
(12) Text justification (leetcode 68)
(13) Simplify path (leetcode 71)
(14) Shortest Palindrome (leetcode 214) KMP
(15) read N character giving read4(leetcde157), II (leetcode 158)
(16) Integer to Roman (leetcode 12) Integer to English Words (leetcode 273)
(17) compare version number (leetcode 165)
2016年3月15日星期二
2016年3月13日星期日
Two Pointer & Binary Search
(1) Substring with Concatenation of All Words (leetcode 30 sliding window)
(2) Remove Duplicates from sorted Array (leetcode 80)
(3) Minimum Window Substring (leetcode 76 sliding window)
(4) Minimum size subarry sum (leetcode 209)
(5) Longest substring without repeating characters (leetcode 3)
(6) LinkedList cycle II (leetcode 142)
(7) Find Duplicate Number (leetcode 287) try both fast/slow pointer and binary search
(8) 3 sum smaller (leetcode 259)
(9) implement strstr (leetcode 28) try both KMP
(10) Search in rotated array (leetcode 33) II (leetcode 81)
(11) Search 2D matrix (leetcode 74) II (leetcode 240)
(12) Median of two sorted Array (leetcode 4)
(13) longest increasing subsequence (leetcode 300)
(14) H-index II (275)
(15) Find minimum in rotated array (leetcode 153) II (leetcode 154)
(16) Wood cut (lintcode 183)
(2) Remove Duplicates from sorted Array (leetcode 80)
(3) Minimum Window Substring (leetcode 76 sliding window)
(4) Minimum size subarry sum (leetcode 209)
(5) Longest substring without repeating characters (leetcode 3)
(6) LinkedList cycle II (leetcode 142)
(7) Find Duplicate Number (leetcode 287) try both fast/slow pointer and binary search
(8) 3 sum smaller (leetcode 259)
(9) implement strstr (leetcode 28) try both KMP
(10) Search in rotated array (leetcode 33) II (leetcode 81)
(11) Search 2D matrix (leetcode 74) II (leetcode 240)
(12) Median of two sorted Array (leetcode 4)
(13) longest increasing subsequence (leetcode 300)
(14) H-index II (275)
(15) Find minimum in rotated array (leetcode 153) II (leetcode 154)
(16) Wood cut (lintcode 183)
2016年3月12日星期六
Greedy
(1) Gas Station (lintcode 187)
(2) Largest Number (lintcode 184)
(3) create maximum number (leetcode 321)
(4) Delete Digits (lintcode 182)
(5) Jump Game (lintcode 116) Jump Game II (lintcode 117)
(6) Next Permutation (lintcode 52) Similar: previous Permutation???
(7) Majority Number I, II, II (lintcode 46, 47, 48)
(8) Maximum subarray difference (lintcode 45)
(9) Candy (leetcode 135)
(10) Maximum gap (leetcode 164)
(11) First missing positive (leetcode 41) similar: find missing number (lintcode 196)
(12) Patching array (leetcode 330)
(13) Meeting room II (leetcode 253)
(2) Largest Number (lintcode 184)
(3) create maximum number (leetcode 321)
(4) Delete Digits (lintcode 182)
(5) Jump Game (lintcode 116) Jump Game II (lintcode 117)
(6) Next Permutation (lintcode 52) Similar: previous Permutation???
(7) Majority Number I, II, II (lintcode 46, 47, 48)
(8) Maximum subarray difference (lintcode 45)
(9) Candy (leetcode 135)
(10) Maximum gap (leetcode 164)
(11) First missing positive (leetcode 41) similar: find missing number (lintcode 196)
(12) Patching array (leetcode 330)
(13) Meeting room II (leetcode 253)
2016年3月10日星期四
Ascending/Descending Stack/ Queue
(1) Binary Tree in-order traversal using iterative way (See Tree)
(2) Max Tree (lintcode pay questions)
(3) Largest Rectangle in Histogram (leetcode 84)
(4) Sliding window maximum (leetcode 239)
(5) Expression Tree Build (lintcode 367)
(6) Expression evaluation (lintcode 368) Similar: Basic Calculator (leetcode 224) Basic Calculator II (leetcode 227)
(7) Convert Expression to Reverse Polish Notation (lintcode 370) similar: evaluate Reverse Polish Notation (leetcode 150)
(8) Expression add operators (leetcode 282)
(2) Max Tree (lintcode pay questions)
(3) Largest Rectangle in Histogram (leetcode 84)
(4) Sliding window maximum (leetcode 239)
(5) Expression Tree Build (lintcode 367)
(6) Expression evaluation (lintcode 368) Similar: Basic Calculator (leetcode 224) Basic Calculator II (leetcode 227)
(7) Convert Expression to Reverse Polish Notation (lintcode 370) similar: evaluate Reverse Polish Notation (leetcode 150)
(8) Expression add operators (leetcode 282)
2016年3月9日星期三
Trie/ Segment Tree/ Binary Index Tree/ Graph/ Union Find
(1) Segment Tree Build, Query, Modify (lintcode 201/202/203)
(2) Interval minimum number (lintcode 205) Similar: Segment Tree Build II (lintcode 439)
(3) Interval sum II (lintcode 207)
(4) Segment Tree Query II
(5) Count Smaller Number before itself (lintcode 249) Similar (leetcode 314 Count smaller number after itself)
(6) Count of Range sum(leetcode 327)
(7) implement Trie (leetcode 208)
(8) Add and Search Word (leetcode 211)
(9) Word Search II (leetcode 212)
(10) Palindrome Pairs (leetcode 336)
(11) Reconstruct literary (leetcode 332, graph edge)
(12) clone graph (leetcode 133)
(13) Minimum height tree (leetcode 310)
(14) Course Schedule II (leetcode 210)
(15) Alien Dictionary (leetcode 269)
(16) Number of islands (leetcode 200) number of islandsII (leetcode 305)
(17) Number of connected components in undirected graph (leetcode 323)
(18) Graph valid tree (leetcode 261)
(2) Interval minimum number (lintcode 205) Similar: Segment Tree Build II (lintcode 439)
(3) Interval sum II (lintcode 207)
(4) Segment Tree Query II
(5) Count Smaller Number before itself (lintcode 249) Similar (leetcode 314 Count smaller number after itself)
(6) Count of Range sum(leetcode 327)
(7) implement Trie (leetcode 208)
(8) Add and Search Word (leetcode 211)
(9) Word Search II (leetcode 212)
(10) Palindrome Pairs (leetcode 336)
(11) Reconstruct literary (leetcode 332, graph edge)
(12) clone graph (leetcode 133)
(13) Minimum height tree (leetcode 310)
(14) Course Schedule II (leetcode 210)
(15) Alien Dictionary (leetcode 269)
(16) Number of islands (leetcode 200) number of islandsII (leetcode 305)
(17) Number of connected components in undirected graph (leetcode 323)
(18) Graph valid tree (leetcode 261)
2016年3月8日星期二
Binary Tree Good Questions
(1) Verify preorder sequence in Binary Search Tree (leetcode 255)
(2) serialize and deserialize binary Tree (leetcode 297)
(3) Recover binary search tree (leetcode 99)
(4) populating next right pointer in each node (leetcode 117)
(5) Convert common ancestor of binary Tree((236) BST(235)
(6) largest BST substree (leetcode 333)
(7) Kth smallest element in BST(leetcode 230) frequent search with modify( node with size infor)
(8) flatten binary tree to linked list(leetcode 114)
(9) count the complete tree node (leetcode 222) try iterative
(10) construct tree from preorder and inorder traversal (leetcode 105)
(11) closest binary search tree value II (leetcode 272) similar: two sum of BST
(12) Binary Tree upside down (leetcode 156)
(13) Binary Tree postorder traversal (leetcode 145)
(14) Binary Tree maximum path sum (leetcode 124)
(2) serialize and deserialize binary Tree (leetcode 297)
(3) Recover binary search tree (leetcode 99)
(4) populating next right pointer in each node (leetcode 117)
(5) Convert common ancestor of binary Tree((236) BST(235)
(6) largest BST substree (leetcode 333)
(7) Kth smallest element in BST(leetcode 230) frequent search with modify( node with size infor)
(8) flatten binary tree to linked list(leetcode 114)
(9) count the complete tree node (leetcode 222) try iterative
(10) construct tree from preorder and inorder traversal (leetcode 105)
(11) closest binary search tree value II (leetcode 272) similar: two sum of BST
(12) Binary Tree upside down (leetcode 156)
(13) Binary Tree postorder traversal (leetcode 145)
(14) Binary Tree maximum path sum (leetcode 124)
2016年3月6日星期日
Back Tracking and Recursion good questions
(1) Word Search II (leetcode 212)
(2) Word Pattern II (leetcode 291)
(3) Word Ladder II (leetcode 126)
(4) Restore IP Address (leetcode 93)
(5) Permutation II (leetcode 47) I (leetcode 46) subset(leetcode 78) - both back tracing & recursion
(6) Generalized Abbreviation (leetcode 320)
(7) Combination Sum II (leetcode 216)
(8) Strobogrammatic Number II (leetcode 247)
(9) longest increasing Path in a Matrix (leetcode 329)
(10) word break (leetcode 139) use both backtracking and DP
(11) Expression add operators (leetcode 282)
(2) Word Pattern II (leetcode 291)
(3) Word Ladder II (leetcode 126)
(4) Restore IP Address (leetcode 93)
(5) Permutation II (leetcode 47) I (leetcode 46) subset(leetcode 78) - both back tracing & recursion
(6) Generalized Abbreviation (leetcode 320)
(7) Combination Sum II (leetcode 216)
(8) Strobogrammatic Number II (leetcode 247)
(9) longest increasing Path in a Matrix (leetcode 329)
(10) word break (leetcode 139) use both backtracking and DP
(11) Expression add operators (leetcode 282)
2016年3月5日星期六
DP good questions
(1) Maximal Rectangle (leetcode 85)
(2) Decode ways (leetcode 91)
(3) word break (leetcode 140) what if return one result. Similar, palindrome partition
(4) ugly number (leetcode 264)
(5) longest increasing sub-sequence (leetcode 300)
(6)Create max number(leetcode 321)
(7)Best time to buy and sell stock with cooldown(leetcode 309)
(8)Best time to buy and sell stock IV (leetcode 188)
(9)Maximum subarray III (lintcode 43)
(10) Minimum Adjust cost (lintcode 91)
(11) Backpack (lintcode 92), backpack II (lintcode 125)
(12) coins in a line II (lintcode 395)
(13) K - sum (lint code 89)
(14) Copy books (lintcode 437)
(15) Coins (cc189, 8.11, page 136)
(2) Decode ways (leetcode 91)
(3) word break (leetcode 140) what if return one result. Similar, palindrome partition
(4) ugly number (leetcode 264)
(5) longest increasing sub-sequence (leetcode 300)
(6)Create max number(leetcode 321)
(7)Best time to buy and sell stock with cooldown(leetcode 309)
(8)Best time to buy and sell stock IV (leetcode 188)
(9)Maximum subarray III (lintcode 43)
(10) Minimum Adjust cost (lintcode 91)
(11) Backpack (lintcode 92), backpack II (lintcode 125)
(12) coins in a line II (lintcode 395)
(13) K - sum (lint code 89)
(14) Copy books (lintcode 437)
(15) Coins (cc189, 8.11, page 136)
订阅:
博文 (Atom)