/algorithm

Primary LanguagePython

Algorithm

10 - Additional Level (Optional)

  • 839. Merge Two Sorted Interval Lists
  • 547. Intersection of Two Arrays
  • 138. Subarray Sum
  • 41. Maximum Subarray
  • 65. Median of two Sorted Arrays
  • 64. Merge Sorted Array
  • 944. Maximum Submatrix
  • 840. Range Sum Query - Mutable
  • 654. Sparse Matrix Multiplication
  • 577. Merge K Sorted Interval Lists
  • 931. Median of K Sorted Arrays
  • 36. Reverse Linked List II
  • 452. Remove Linked List Elements
  • 166. Nth to Last Node in List

09 - 4 Key Points of DP and Coordinate DP

  • 115. Unique Paths II
  • 114. Unique Paths
  • 111. Climbing Stairs
  • 110. Minimum Path Sum
  • 603. Largest Divisible Subset
  • 76. Longest Increasing Subsequence
  • 602. Russian Doll Envelopes
  • 272. Climbing Stairs II

08 - Memoization Search & Dynamic Programming

  • 582. Word Break II
  • 192. Wildcard Matching
  • 154. Regular Expression Matching
  • 190. Next Permutation II
  • 197. Permutation Index
  • 52. Next Permutation
  • 683. Word Break III
  • 109. Triangle
  • 107. Word Break
  • 828. Word Pattern
  • 211. String Permutation

07 - Hash & Heap

  • 642. Moving Average from Data Stream
  • 494. Implement Stack by Two Queues
  • 209. First Unique Character in a String
  • 657. Insert Delete GetRandom O(1)
  • 612. K Closest Points
  • 544. Top k Largest Numbers
  • 104. Merge K Sorted Lists
  • 40. Implement Queue by Two Stacks
  • 4. Ugly Number II
  • 134. LRU Cache
  • 495. Implement Stack
  • 128. Hash Function
  • 486. Merge K Sorted Arrays
  • 130. Heapify
  • 129. Rehashing
  • 551. Nested List Weight Sum
  • 224. Implement Three Stacks by Single Array

6 - Implicit Graph DFS

  • 680. Split String
  • 425. Letter Combinations of a Phone Number
  • 153. Combination Sum II
  • 135. Combination Sum
  • 33. N-Queens
  • 18. Subsets II
  • 17. Subsets (use Backtracking)
  • 15. Permutations (use recursion--dfs and iteration)
  • 829. Word Pattern II
  • 121. Word Ladder II
  • 152. Combinations
  • 16. Permutations II

05 - Two Pointers

  • 228. Middle of Linked List
  • 521. Remove Duplicate Numbers in Array
  • 464. Sort Integers II (use mergeSort)
  • 604. Window Sum
  • 56. Two Sum
  • 148. Sort Colors
  • 610. Two Sum - Difference equals to target
  • 380. Intersection of Two Linked Lists
  • 102. Linked List Cycle
  • 103. Linked List Cycle II
  • 539. Move Zeroes
  • 607. Two Sum III - Data structure design

04 - Binary Tree - Divide Conquer & Traverse

  • 66. Binary Tree Preorder Traversal (use Morris and Traversal)
  • 67. Binary Tree Inorder Traversal (use Morris and Traversal)
  • 68. Binary Tree Postorder Traversal (use Morris and Traversal)
  • 900. Closest Binary Search Tree Value
  • 596. Minimum Subtree
  • 480. Binary Tree Paths
  • 453. Flatten Binary Tree to Linked List
  • 93. Balanced Binary Tree
  • 902. Kth Smallest Element in a BST
  • 578. Lowest Common Ancestor III
  • 95. Validate Binary Search Tree
  • 597. Subtree with Maximum Average
  • 474. Lowest Common Ancestor II
  • 246. Binary Tree Path Sum II
  • 155. Minimum Depth of Binary Tree
  • 97. Maximum Depth of Binary Tree (use Both Divide Conquer and Traversal)
  • 595. Binary Tree Longest Consecutive Sequence

03 - Binary Search

  • 428. Pow(x, n)
  • 140. Fast Power
  • 14. First Position of Target
  • 38. Search a 2D Matrix II
  • 457. Classical Binary Search
  • 458. Last Position of Target
  • 585. Maximum Number in Mountain Sequence
  • 460. Find K Closest Elements
  • 447. Search in a Big Sorted Array
  • 159. Find Minimum in Rotated Sorted Array
  • 75. Find Peak Element
  • 74. First Bad Version
  • 62. Search in Rotated Sorted Array
  • 462. Total Occurrence of Target
  • 459. Closest Number in Sorted Array
  • 235. Prime Factorization
  • 254. Drop Eggs
  • 28. Search a 2D Matrix
  • 141. Sqrt(x)

02 - Breadth First Search

  • 433. Number of Islands
  • 69. Binary Tree Level Order Traversal
  • 242. Convert Binary Tree to Linked Lists by Depth
  • 615. Course Schedule
  • 616. Course Schedule II
  • 611. Knight Shortest Path
  • 605. Sequence Reconstruction
  • 137. Clone Graph
  • 127. Topological Sorting
  • 7. Serialize and Deserialize Binary Tree
  • 120. Word Ladder
  • 624. Remove Substrings
  • 618. Search Graph Nodes
  • 598. Zombie in Matrix
  • 531. Six Degrees
  • 178. Graph Valid Tree
  • 70. Binary Tree Level Order Traversal II
  • 71. Binary Tree Zigzag Level Order Traversal

01 - Defeat the Algorithm Interview

  • 415. Valid Palindrome
  • 594. strStr II
  • 627. Longest Palindrome
  • 13. Implement strStr()
  • 200. Longest Palindromic Substring
  • 667. Longest Palindromic Subsequence
  • 841. String Replace

20190117

  • 365. Count 1 in Binary
  • 179. Update Bits
  • 136. Palindrome Partitioning
  • 10. String Permutation II
  • 34. N-Queens II
  • 132. Word Search II

20190110

  • 955. Implement Queue by Circular Array
  • 44. Minimum Subarray
  • 30. Insert Interval
  • 156. Merge Intervals

20190104

  • 463. Sort Integers (use quickSort)
  • 5. Kth Largest Element
  • 814. Shortest Path in Undirected Graph
  • 73. Construct Binary Tree from Preorder and Inorder Traversal
  • 72. Construct Binary Tree from Inorder and Postorder Traversal

20190101

  • 891. Valid Palindrome II
  • 81. Find Median from Data Stream

20181223

  • 235. Prime Factorization
  • 39. Recover Rotated Sorted Array
  • 845. Greatest Common Divisor

201906

Check Name Link Date
01
627. Longest Palindrome https://www.lintcode.com/problem/longest-palindrome/ 06/30/2019
13. Implement strStr() https://www.lintcode.com/problem/implement-strstr/ 07/01/2019
415. Valid Palindrome https://www.lintcode.com/problem/valid-palindrome/ 07/02/2019
200. Longest Palindromic Substring https://www.lintcode.com/problem/longest-palindromic-substring/ 07/03/2019
667. Longest Palindromic Subsequence https://www.lintcode.com/problem/longest-palindromic-subsequence/ 07/04/2019
841. String Replace https://www.lintcode.com/problem/string-replace/ 07/05/2019
594. strStr II https://www.lintcode.com/problem/strstr-ii/ 07/06/2019
02
433. Number of Islands https://www.lintcode.com/problem/number-of-islands/ 07/08/2019
69. Binary Tree Level Order Traversal https://www.lintcode.com/problem/binary-tree-level-order-traversal/ 07/09/2019
242. Convert Binary Tree to Linked Lists by Depth https://www.lintcode.com/problem/convert-binary-tree-to-linked-lists-by-depth/ 07/10/2019
615. Course Schedule https://www.lintcode.com/problem/course-schedule/ 07/11/2019
616. Course Schedule II https://www.lintcode.com/problem/course-schedule-ii/ 07/12/2019
611. Knight Shortest Path https://www.lintcode.com/problem/knight-shortest-path/ 07/12/2019
605. Sequence Reconstruction https://www.lintcode.com/problem/sequence-reconstruction/ 07/13/2019
137. Clone Graph https://www.lintcode.com/problem/clone-graph/ 07/14/2019
127. Topological Sorting https://www.lintcode.com/problem/topological-sorting/ 01/04/2019
7. Serialize and Deserialize Binary Tree https://www.lintcode.com/problem/serialize-and-deserialize-binary-tree/ 07/15/2019
624. Remove Substrings https://www.lintcode.com/problem/remove-substrings/ 07/16/2019
618. Search Graph Nodes https://www.lintcode.com/problem/search-graph-nodes/ 07/16/2019
598. Zombie in Matrix https://www.lintcode.com/problem/zombie-in-matrix/ 07/17/2019
531. Six Degrees https://www.lintcode.com/problem/six-degrees/ 07/18/2019
178. Graph Valid Tree https://www.lintcode.com/problem/graph-valid-tree/ 07/18/2019
120. Word Ladder https://www.lintcode.com/problem/word-ladder/ 07/16/2019
03
458. Last Position of Target https://www.lintcode.com/problem/last-position-of-target/ 07/19/2019
585. Maximum Number in Mountain Sequence https://www.lintcode.com/problem/maximum-number-in-mountain-sequence/ 07/19/2019
460. Find K Closest Elements https://www.lintcode.com/problem/find-k-closest-elements/ 07/20/2019
447. Search in a Big Sorted Array https://www.lintcode.com/problem/search-in-a-big-sorted-array/ 07/21/2019
428. Pow(x, n) https://www.lintcode.com/problem/powx-n/ 12/23/2018
159. Find Minimum in Rotated Sorted Array https://www.lintcode.com/problem/find-minimum-in-rotated-sorted-array/ 07/22/2019
140. Fast Power https://www.lintcode.com/problem/fast-power/ 12/23/2018
75. Find Peak Element https://www.lintcode.com/problem/find-peak-element/ 07/23/2019
74. First Bad Version https://www.lintcode.com/problem/first-bad-version/ 07/23/2019
62. Search in Rotated Sorted Array https://www.lintcode.com/problem/search-in-rotated-sorted-array/ 07/23/2019
462. Total Occurrence of Target https://www.lintcode.com/problem/total-occurrence-of-target/ 08/01/2019
459. Closest Number in Sorted Array https://www.lintcode.com/problem/closest-number-in-sorted-array/ 08/01/2019
235. Prime Factorization https://www.lintcode.com/problem/prime-factorization/ 08/01/2019
254. Drop Eggs https://www.lintcode.com/problem/drop-eggs/ 08/01/2019
28. Search a 2D Matrix https://www.lintcode.com/problem/search-a-2d-matrix/ 08/01/2019
141. Sqrt(x) https://www.lintcode.com/problem/sqrtx/ 08/02/2019
04
900. Closest Binary Search Tree Value https://www.lintcode.com/problem/closest-binary-search-tree-value/ 07/24/2019
596. Minimum Subtree https://www.lintcode.com/problem/minimum-subtree/ 07/25/2019
480. Binary Tree Paths https://www.lintcode.com/problem/binary-tree-paths/ 07/26/2019
453. Flatten Binary Tree to Linked List https://www.lintcode.com/problem/flatten-binary-tree-to-linked-list/ 07/27/2019
93. Balanced Binary Tree https://www.lintcode.com/problem/balanced-binary-tree/ 01/04/2019
902. Kth Smallest Element in a BST https://www.lintcode.com/problem/kth-smallest-element-in-a-bst/ 07/27/2019
578. Lowest Common Ancestor III https://www.lintcode.com/problem/lowest-common-ancestor-iii/ 07/28/2019
95. Validate Binary Search Tree https://www.lintcode.com/problem/validate-binary-search-tree/ 01/04/2019
597. Subtree with Maximum Average https://www.lintcode.com/problem/subtree-with-maximum-average/ 07/30/2019
474. Lowest Common Ancestor II https://www.lintcode.com/problem/lowest-common-ancestor-ii/ 08/02/2019
246. Binary Tree Path Sum II https://www.lintcode.com/problem/binary-tree-path-sum-ii/ 08/02/2019
155. Minimum Depth of Binary Tree https://www.lintcode.com/problem/minimum-depth-of-binary-tree/ 08/02/2019
595. Binary Tree Longest Consecutive Sequence https://www.lintcode.com/problem/binary-tree-longest-consecutive-sequence/ 08/02/2019
05
539. Move Zeroes https://www.lintcode.com/problem/move-zeroes/ 08/01/2019
228. Middle of Linked List https://www.lintcode.com/problem/middle-of-linked-list/ 08/03/2019
607. Two Sum III - Data structure design https://www.lintcode.com/problem/two-sum-iii-data-structure-design/ 08/03/2019
521. Remove Duplicate Numbers in Array https://www.lintcode.com/problem/remove-duplicate-numbers-in-array/ 01/01/2019
464. Sort Integers II https://www.lintcode.com/problem/sort-integers-ii/ 01/04/2019
604. Window Sum https://www.lintcode.com/problem/window-sum/ 01/01/2019
56. Two Sum https://www.lintcode.com/problem/two-sum/ 01/01/2019
06
07
642. Moving Average from Data Stream https://www.lintcode.com/problem/moving-average-from-data-stream/ 08/04/2019
494. Implement Stack by Two Queues https://www.lintcode.com/problem/implement-stack-by-two-queues/ 08/04/2019
209. First Unique Character in a String https://www.lintcode.com/problem/first-unique-character-in-a-string/ 08/04/2019
495. Implement Stack https://www.lintcode.com/problem/implement-stack/ 08/04/2019
128. Hash Function https://www.lintcode.com/problem/hash-function/ 08/04/2019
551. Nested List Weight Sum https://www.lintcode.com/problem/nested-list-weight-sum/ 08/04/2019
08
828. Word Pattern https://www.lintcode.com/problem/word-pattern/ 08/04/2019
211. String Permutation https://www.lintcode.com/problem/string-permutation/ 08/04/2019
09
115. Unique Paths II https://www.lintcode.com/problem/unique-paths-ii/ 08/05/2019
114. Unique Paths https://www.lintcode.com/problem/unique-paths/ 08/05/2019
111. Climbing Stairs https://www.lintcode.com/problem/climbing-stairs/ 08/05/2019
110. Minimum Path Sum https://www.lintcode.com/problem/minimum-path-sum/ 08/05/2019
272. Climbing Stairs II https://www.lintcode.com/problem/climbing-stairs-ii/ 08/05/2019
76. Longest Increasing Subsequence https://www.lintcode.com/problem/longest-increasing-subsequence/ 08/07/2019
10
839. Merge Two Sorted Interval Lists https://www.lintcode.com/problem/merge-two-sorted-interval-lists/ 08/06/2019
547. Intersection of Two Arrays https://www.lintcode.com/problem/intersection-of-two-arrays/ 08/06/2019
138. Subarray Sum https://www.lintcode.com/problem/subarray-sum/ 08/06/2019
64. Merge Sorted Array https://www.lintcode.com/problem/merge-sorted-array/ 08/06/2019
41. Maximum Subarray https://www.lintcode.com/problem/maximum-subarray 08/06/2019
943. Range Sum Query - Immutable https://www.lintcode.com/problem/range-sum-query-immutable/ 08/06/2019
165. Merge Two Sorted Lists https://www.lintcode.com/problem/merge-two-sorted-lists/ 08/06/2019
6. Merge Two Sorted Arrays https://www.lintcode.com/problem/merge-two-sorted-arrays/ 08/06/2019
11
1126. Merge Two Binary Trees 04 https://www.lintcode.com/problem/merge-two-binary-trees/ 08/05/2019
838. Subarray Sum Equals K 10 https://www.lintcode.com/problem/subarray-sum-equals-k/ 08/06/2019
669. Coin Change https://www.lintcode.com/problem/coin-change/ 08/07/2019