# The NeetCode 150, in order, with a tracker

> All 150 NeetCode problems in NeetCode's order, grouped by category with difficulty, the seven LeetCode Premium ones flagged, and free verified tracking.

## Arrays & Hashing

1. [Contains Duplicate](https://leetcode.com/problems/contains-duplicate/) (Easy), week 1
2. [Valid Anagram](https://leetcode.com/problems/valid-anagram/) (Easy), week 1
3. [Two Sum](https://leetcode.com/problems/two-sum/) (Easy), week 2
4. [Group Anagrams](https://leetcode.com/problems/group-anagrams/) (Medium), week 2
5. [Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements/) (Medium), week 3
6. [Encode and Decode Strings](https://neetcode.io/problems/encode-and-decode-strings) (Medium, LeetCode Premium), week 3
7. [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/) (Medium), week 4
8. [Valid Sudoku](https://leetcode.com/problems/valid-sudoku/) (Medium), week 4
9. [Longest Consecutive Sequence](https://leetcode.com/problems/longest-consecutive-sequence/) (Medium), week 5

## Two Pointers

10. [Valid Palindrome](https://leetcode.com/problems/valid-palindrome/) (Easy), week 5
11. [Two Sum II Input Array Is Sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/) (Medium), week 6
12. [3Sum](https://leetcode.com/problems/3sum/) (Medium), week 6
13. [Container With Most Water](https://leetcode.com/problems/container-with-most-water/) (Medium), week 7
14. [Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/) (Hard), week 7

## Sliding Window

15. [Best Time to Buy And Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/) (Easy), week 8
16. [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/) (Medium), week 8
17. [Longest Repeating Character Replacement](https://leetcode.com/problems/longest-repeating-character-replacement/) (Medium), week 9
18. [Permutation In String](https://leetcode.com/problems/permutation-in-string/) (Medium), week 9
19. [Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring/) (Hard), week 10
20. [Sliding Window Maximum](https://leetcode.com/problems/sliding-window-maximum/) (Hard), week 10

## Stack

21. [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) (Easy), week 11
22. [Min Stack](https://leetcode.com/problems/min-stack/) (Medium), week 11
23. [Evaluate Reverse Polish Notation](https://leetcode.com/problems/evaluate-reverse-polish-notation/) (Medium), week 12
24. [Daily Temperatures](https://leetcode.com/problems/daily-temperatures/) (Medium), week 12
25. [Car Fleet](https://leetcode.com/problems/car-fleet/) (Medium), week 13
26. [Largest Rectangle In Histogram](https://leetcode.com/problems/largest-rectangle-in-histogram/) (Hard), week 13

## Binary Search

27. [Binary Search](https://leetcode.com/problems/binary-search/) (Easy), week 14
28. [Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix/) (Medium), week 14
29. [Koko Eating Bananas](https://leetcode.com/problems/koko-eating-bananas/) (Medium), week 15
30. [Find Minimum In Rotated Sorted Array](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/) (Medium), week 15
31. [Search In Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/) (Medium), week 16
32. [Time Based Key Value Store](https://leetcode.com/problems/time-based-key-value-store/) (Medium), week 16
33. [Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/) (Hard), week 17

## Linked List

34. [Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/) (Easy), week 17
35. [Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/) (Easy), week 18
36. [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/) (Easy), week 18
37. [Reorder List](https://leetcode.com/problems/reorder-list/) (Medium), week 19
38. [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/) (Medium), week 19
39. [Copy List With Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/) (Medium), week 20
40. [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) (Medium), week 20
41. [Find The Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/) (Medium), week 21
42. [LRU Cache](https://leetcode.com/problems/lru-cache/) (Medium), week 21
43. [Merge K Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/) (Hard), week 22
44. [Reverse Nodes In K Group](https://leetcode.com/problems/reverse-nodes-in-k-group/) (Hard), week 22

## Trees

45. [Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/) (Easy), week 23
46. [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/) (Easy), week 23
47. [Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/) (Easy), week 24
48. [Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/) (Easy), week 24
49. [Same Tree](https://leetcode.com/problems/same-tree/) (Easy), week 25
50. [Subtree of Another Tree](https://leetcode.com/problems/subtree-of-another-tree/) (Easy), week 25
51. [Lowest Common Ancestor of a Binary Search Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/) (Medium), week 26
52. [Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/) (Medium), week 26
53. [Binary Tree Right Side View](https://leetcode.com/problems/binary-tree-right-side-view/) (Medium), week 27
54. [Count Good Nodes In Binary Tree](https://leetcode.com/problems/count-good-nodes-in-binary-tree/) (Medium), week 27
55. [Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/) (Medium), week 28
56. [Kth Smallest Element In a Bst](https://leetcode.com/problems/kth-smallest-element-in-a-bst/) (Medium), week 28
57. [Construct Binary Tree From Preorder And Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/) (Medium), week 29
58. [Binary Tree Maximum Path Sum](https://leetcode.com/problems/binary-tree-maximum-path-sum/) (Hard), week 29
59. [Serialize And Deserialize Binary Tree](https://leetcode.com/problems/serialize-and-deserialize-binary-tree/) (Hard), week 30

## Heap / Priority Queue

60. [Kth Largest Element In a Stream](https://leetcode.com/problems/kth-largest-element-in-a-stream/) (Easy), week 30
61. [Last Stone Weight](https://leetcode.com/problems/last-stone-weight/) (Easy), week 31
62. [K Closest Points to Origin](https://leetcode.com/problems/k-closest-points-to-origin/) (Medium), week 31
63. [Kth Largest Element In An Array](https://leetcode.com/problems/kth-largest-element-in-an-array/) (Medium), week 32
64. [Task Scheduler](https://leetcode.com/problems/task-scheduler/) (Medium), week 32
65. [Design Twitter](https://leetcode.com/problems/design-twitter/) (Medium), week 33
66. [Find Median From Data Stream](https://leetcode.com/problems/find-median-from-data-stream/) (Hard), week 33

## Backtracking

67. [Subsets](https://leetcode.com/problems/subsets/) (Medium), week 34
68. [Combination Sum](https://leetcode.com/problems/combination-sum/) (Medium), week 34
69. [Combination Sum II](https://leetcode.com/problems/combination-sum-ii/) (Medium), week 35
70. [Permutations](https://leetcode.com/problems/permutations/) (Medium), week 35
71. [Subsets II](https://leetcode.com/problems/subsets-ii/) (Medium), week 36
72. [Generate Parentheses](https://leetcode.com/problems/generate-parentheses/) (Medium), week 36
73. [Word Search](https://leetcode.com/problems/word-search/) (Medium), week 37
74. [Palindrome Partitioning](https://leetcode.com/problems/palindrome-partitioning/) (Medium), week 37
75. [Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number/) (Medium), week 38
76. [N Queens](https://leetcode.com/problems/n-queens/) (Hard), week 38

## Tries

77. [Implement Trie Prefix Tree](https://leetcode.com/problems/implement-trie-prefix-tree/) (Medium), week 39
78. [Design Add And Search Words Data Structure](https://leetcode.com/problems/design-add-and-search-words-data-structure/) (Medium), week 39
79. [Word Search II](https://leetcode.com/problems/word-search-ii/) (Hard), week 40

## Graphs

80. [Number of Islands](https://leetcode.com/problems/number-of-islands/) (Medium), week 40
81. [Max Area of Island](https://leetcode.com/problems/max-area-of-island/) (Medium), week 41
82. [Clone Graph](https://leetcode.com/problems/clone-graph/) (Medium), week 41
83. [Walls And Gates](https://neetcode.io/problems/walls-and-gates) (Medium, LeetCode Premium), week 42
84. [Rotting Oranges](https://leetcode.com/problems/rotting-oranges/) (Medium), week 42
85. [Pacific Atlantic Water Flow](https://leetcode.com/problems/pacific-atlantic-water-flow/) (Medium), week 43
86. [Surrounded Regions](https://leetcode.com/problems/surrounded-regions/) (Medium), week 43
87. [Course Schedule](https://leetcode.com/problems/course-schedule/) (Medium), week 44
88. [Course Schedule II](https://leetcode.com/problems/course-schedule-ii/) (Medium), week 44
89. [Graph Valid Tree](https://neetcode.io/problems/graph-valid-tree) (Medium, LeetCode Premium), week 45
90. [Number of Connected Components In An Undirected Graph](https://neetcode.io/problems/number-of-connected-components-in-an-undirected-graph) (Medium, LeetCode Premium), week 45
91. [Redundant Connection](https://leetcode.com/problems/redundant-connection/) (Medium), week 46
92. [Word Ladder](https://leetcode.com/problems/word-ladder/) (Hard), week 46

## Advanced Graphs

93. [Network Delay Time](https://leetcode.com/problems/network-delay-time/) (Medium), week 47
94. [Reconstruct Itinerary](https://leetcode.com/problems/reconstruct-itinerary/) (Hard), week 47
95. [Min Cost to Connect All Points](https://leetcode.com/problems/min-cost-to-connect-all-points/) (Medium), week 48
96. [Swim In Rising Water](https://leetcode.com/problems/swim-in-rising-water/) (Hard), week 48
97. [Alien Dictionary](https://neetcode.io/problems/alien-dictionary) (Hard, LeetCode Premium), week 49
98. [Cheapest Flights Within K Stops](https://leetcode.com/problems/cheapest-flights-within-k-stops/) (Medium), week 49

## 1-D Dynamic Programming

99. [Climbing Stairs](https://leetcode.com/problems/climbing-stairs/) (Easy), week 50
100. [Min Cost Climbing Stairs](https://leetcode.com/problems/min-cost-climbing-stairs/) (Easy), week 50
101. [House Robber](https://leetcode.com/problems/house-robber/) (Medium), week 51
102. [House Robber II](https://leetcode.com/problems/house-robber-ii/) (Medium), week 51
103. [Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/) (Medium), week 52
104. [Palindromic Substrings](https://leetcode.com/problems/palindromic-substrings/) (Medium), week 52
105. [Decode Ways](https://leetcode.com/problems/decode-ways/) (Medium), week 53
106. [Coin Change](https://leetcode.com/problems/coin-change/) (Medium), week 53
107. [Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/) (Medium), week 54
108. [Word Break](https://leetcode.com/problems/word-break/) (Medium), week 54
109. [Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence/) (Medium), week 55
110. [Partition Equal Subset Sum](https://leetcode.com/problems/partition-equal-subset-sum/) (Medium), week 55

## 2-D Dynamic Programming

111. [Unique Paths](https://leetcode.com/problems/unique-paths/) (Medium), week 56
112. [Longest Common Subsequence](https://leetcode.com/problems/longest-common-subsequence/) (Medium), week 56
113. [Best Time to Buy And Sell Stock With Cooldown](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/) (Medium), week 57
114. [Coin Change II](https://leetcode.com/problems/coin-change-ii/) (Medium), week 57
115. [Target Sum](https://leetcode.com/problems/target-sum/) (Medium), week 58
116. [Interleaving String](https://leetcode.com/problems/interleaving-string/) (Medium), week 58
117. [Longest Increasing Path In a Matrix](https://leetcode.com/problems/longest-increasing-path-in-a-matrix/) (Hard), week 59
118. [Distinct Subsequences](https://leetcode.com/problems/distinct-subsequences/) (Hard), week 59
119. [Edit Distance](https://leetcode.com/problems/edit-distance/) (Medium), week 60
120. [Burst Balloons](https://leetcode.com/problems/burst-balloons/) (Hard), week 60
121. [Regular Expression Matching](https://leetcode.com/problems/regular-expression-matching/) (Hard), week 61

## Greedy

122. [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/) (Medium), week 61
123. [Jump Game](https://leetcode.com/problems/jump-game/) (Medium), week 62
124. [Jump Game II](https://leetcode.com/problems/jump-game-ii/) (Medium), week 62
125. [Gas Station](https://leetcode.com/problems/gas-station/) (Medium), week 63
126. [Hand of Straights](https://leetcode.com/problems/hand-of-straights/) (Medium), week 63
127. [Merge Triplets to Form Target Triplet](https://leetcode.com/problems/merge-triplets-to-form-target-triplet/) (Medium), week 64
128. [Partition Labels](https://leetcode.com/problems/partition-labels/) (Medium), week 64
129. [Valid Parenthesis String](https://leetcode.com/problems/valid-parenthesis-string/) (Medium), week 65

## Intervals

130. [Insert Interval](https://leetcode.com/problems/insert-interval/) (Medium), week 65
131. [Merge Intervals](https://leetcode.com/problems/merge-intervals/) (Medium), week 66
132. [Non Overlapping Intervals](https://leetcode.com/problems/non-overlapping-intervals/) (Medium), week 66
133. [Meeting Rooms](https://neetcode.io/problems/meeting-rooms) (Easy, LeetCode Premium), week 67
134. [Meeting Rooms II](https://neetcode.io/problems/meeting-rooms-ii) (Medium, LeetCode Premium), week 67
135. [Minimum Interval to Include Each Query](https://leetcode.com/problems/minimum-interval-to-include-each-query/) (Hard), week 68

## Math & Geometry

136. [Rotate Image](https://leetcode.com/problems/rotate-image/) (Medium), week 68
137. [Spiral Matrix](https://leetcode.com/problems/spiral-matrix/) (Medium), week 69
138. [Set Matrix Zeroes](https://leetcode.com/problems/set-matrix-zeroes/) (Medium), week 69
139. [Happy Number](https://leetcode.com/problems/happy-number/) (Easy), week 70
140. [Plus One](https://leetcode.com/problems/plus-one/) (Easy), week 70
141. [Pow(x, n)](https://leetcode.com/problems/powx-n/) (Medium), week 71
142. [Multiply Strings](https://leetcode.com/problems/multiply-strings/) (Medium), week 71
143. [Detect Squares](https://leetcode.com/problems/detect-squares/) (Medium), week 72

## Bit Manipulation

144. [Single Number](https://leetcode.com/problems/single-number/) (Easy), week 72
145. [Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/) (Easy), week 73
146. [Counting Bits](https://leetcode.com/problems/counting-bits/) (Easy), week 73
147. [Reverse Bits](https://leetcode.com/problems/reverse-bits/) (Easy), week 74
148. [Missing Number](https://leetcode.com/problems/missing-number/) (Easy), week 74
149. [Sum of Two Integers](https://leetcode.com/problems/sum-of-two-integers/) (Medium), week 75
150. [Reverse Integer](https://leetcode.com/problems/reverse-integer/) (Medium), week 75

## Questions

### How many NeetCode 150 problems are LeetCode Premium?

7: Encode and Decode Strings, Walls And Gates, Graph Valid Tree, Number of Connected Components In An Undirected Graph, Alien Dictionary, Meeting Rooms, Meeting Rooms II. Each can be solved free on neetcode.io.

### How long does the NeetCode 150 take?

At two problems a week, as on the cracked.guide path, 75 weeks. Full time, a few weeks to a couple of months.

### How does cracked.guide track NeetCode progress?

Link your LeetCode username. Accepted NeetCode 150 problems on your public profile are read from there and count toward the week; Premium problems solved on neetcode.io you mark yourself.

---

Source: https://cracked.guide/neetcode-150
cracked.guide: A free, dated 145-week path to getting genuinely cracked at programming.
