Roadmap


  1. Arrays & Hashing
  2. Two Pointers
  3. Stack
  4. Binary Search
  5. Sliding Window
  6. Linked List
  7. Trees
  8. Tries
  9. Heap / Priority Queue
  10. Backtracking
  11. Graphs
  12. 1-D Dynamic Programming
  13. Intervals
  14. Greedy
  15. Advanced Graphs
  16. 2-D Dynamic Programming
  17. Bit Manipulation
  18. Math & Geometry

Blind 75

Blind 75 LeetCode is a carefully curated collection of 75 essential coding interview problems that cover the most important data structures and algorithms. These problems have become a popular interview preparation resource and have helped thousands of developers land software engineering roles at top tech companies such as Google, Amazon, Microsoft, Meta, and many others.


Contents

  1. Arrays & Hashing (8)
  2. Two Pointers (3)
  3. Sliding Window (4)
  4. Stack (1)
  5. Binary Search (2)
  6. Linked List (6)
  7. Trees (11)
  8. Heap / Priority Queue (1)
  9. Backtracking (2)
  10. Tries (3)
  11. Graphs (6)
  12. Advanced Graphs (1)
  13. 1-D Dynamic Programming (10)
  14. 2-D Dynamic Programming (2)
  15. Greedy (2)
  16. Intervals (5)
  17. Math & Geometry (3)
  18. Bit Manipulation (5)

Total Questions: 75


Difficulty

Difficulty Problems
Easy 19
Medium 49
Hard 7
Total 75

Blind 75


1. Arrays & Hashing (8)

  1. Contains Duplicate
  2. Valid Anagram
  3. Two Sum
  4. Group Anagrams
  5. Top K Frequent Elements
  6. Product of Array Except Self
  7. Valid Sudoku
  8. Longest Consecutive Sequence

2. Two Pointers (3)

  1. Valid Palindrome
  2. 3Sum
  3. Container With Most Water

3. Sliding Window (4)

  1. Best Time to Buy and Sell Stock
  2. Longest Substring Without Repeating Characters
  3. Longest Repeating Character Replacement
  4. Minimum Window Substring

4. Stack (1)

  1. Valid Parentheses

5. Binary Search (2)

  1. Find Minimum in Rotated Sorted Array
  2. Search in Rotated Sorted Array

6. Linked List (6)

  1. Reverse Linked List
  2. Linked List Cycle
  3. Merge Two Sorted Lists
  4. Merge K Sorted Lists
  5. Remove Nth Node From End of List
  6. Reorder List

7. Trees (11)

  1. Invert Binary Tree
  2. Maximum Depth of Binary Tree
  3. Diameter of Binary Tree
  4. Balanced Binary Tree
  5. Same Tree
  6. Subtree of Another Tree
  7. Lowest Common Ancestor of a Binary Search Tree
  8. Binary Tree Level Order Traversal
  9. Binary Tree Right Side View
  10. Count Good Nodes in Binary Tree
  11. Validate Binary Search Tree

8. Heap / Priority Queue (1)

  1. Kth Largest Element in an Array

9. Backtracking (2)

  1. Combination Sum
  2. Word Search

10. Tries (3)

  1. Implement Trie (Prefix Tree)
  2. Design Add and Search Words Data Structure
  3. Word Search II

11. Graphs (6)

  1. Number of Islands
  2. Clone Graph
  3. Pacific Atlantic Water Flow
  4. Course Schedule
  5. Graph Valid Tree
  6. Number of Connected Components in an Undirected Graph

12. Advanced Graphs (1)

  1. Alien Dictionary

13. 1-D Dynamic Programming (10)

  1. Climbing Stairs
  2. House Robber
  3. House Robber II
  4. Longest Palindromic Substring
  5. Palindromic Substrings
  6. Decode Ways
  7. Coin Change
  8. Maximum Product Subarray
  9. Word Break
  10. Longest Increasing Subsequence

14. 2-D Dynamic Programming (2)

  1. Unique Paths
  2. Longest Common Subsequence

15. Greedy (2)

  1. Maximum Subarray
  2. Jump Game

16. Intervals (5)

  1. Insert Interval
  2. Merge Intervals
  3. Non-overlapping Intervals
  4. Meeting Rooms
  5. Meeting Rooms II

17. Math & Geometry (3)

  1. Rotate Image
  2. Spiral Matrix
  3. Set Matrix Zeroes

18. Bit Manipulation (5)

  1. Sum of Two Integers
  2. Number of 1 Bits
  3. Counting Bits
  4. Missing Number
  5. Reverse Bits

Neetcode


NeetCode 150

The NeetCode 150 is the Blind 75 + 75 more problems.
It is the perfect list for people already familiar with basic algorithms & data structures.


Contents

  1. Arrays & Hashing (9)
  2. Two Pointers (5)
  3. Sliding Window (6)
  4. Stack (7)
  5. Binary Search (7)
  6. Linked List (11)
  7. Trees (15)
  8. Tries (3)
  9. Heap / Priority Queue (7)
  10. Backtracking (10)
  11. Graphs (13)
  12. Advanced Graphs (6)
  13. 1-D Dynamic Programming (12)
  14. 2-D Dynamic Programming (11)
  15. Greedy (8)
  16. Intervals (6)
  17. Math & Geometry (8)
  18. Bit Manipulation (7)

Difficulty Level

Difficulty Progress
Easy 28
Medium 101
Hard 21
Total 150

NeetCode 150


1. Arrays & Hashing (9)

  1. Contains Duplicate
  2. Valid Anagram
  3. Two Sum
  4. Group Anagrams
  5. Top K Frequent Elements
  6. Product of Array Except Self
  7. Valid Sudoku
  8. Encode and Decode Strings
  9. Longest Consecutive Sequence

2. Two Pointers (5)

  1. Valid Palindrome
  2. Two Sum II - Input Array Is Sorted
  3. 3Sum
  4. Container With Most Water
  5. Trapping Rain Water

3. Sliding Window (6)

  1. Best Time to Buy and Sell Stock
  2. Longest Substring Without Repeating Characters
  3. Longest Repeating Character Replacement
  4. Permutation in String
  5. Minimum Window Substring
  6. Sliding Window Maximum

4. Stack (6)

  1. Valid Parentheses
  2. Min Stack
  3. Evaluate Reverse Polish Notation
  4. Generate Parentheses
  5. Daily Temperatures
  6. Car Fleet
  7. Largest Rectangle in Histogram

5. Binary Search (7)

  1. Binary Search
  2. Search a 2D Matrix
  3. Koko Eating Bananas
  4. Find Minimum in Rotated Sorted Array
  5. Search in Rotated Sorted Array
  6. Time Based Key-Value Store
  7. Median of Two Sorted Arrays

6. Linked List (11)

  1. Reverse Linked List
  2. Merge Two Sorted Lists
  3. Reorder List
  4. Remove Nth Node From End of List
  5. Copy List With Random Pointer
  6. Add Two Numbers
  7. Linked List Cycle
  8. Find the Duplicate Number
  9. LRU Cache
  10. Merge K Sorted Lists
  11. Reverse Nodes in K-Group

7. Trees (15)

  1. Invert Binary Tree
  2. Maximum Depth of Binary Tree
  3. Diameter of Binary Tree
  4. Balanced Binary Tree
  5. Same Tree
  6. Subtree of Another Tree
  7. Lowest Common Ancestor of a Binary Search Tree
  8. Binary Tree Level Order Traversal
  9. Binary Tree Right Side View
  10. Count Good Nodes in Binary Tree
  11. Validate Binary Search Tree
  12. Kth Smallest Element in a BST
  13. Construct Binary Tree from Preorder and Inorder Traversal
  14. Binary Tree Maximum Path Sum
  15. Serialize and Deserialize Binary Tree

8. Tries (3)

  1. Implement Trie (Prefix Tree)
  2. Design Add and Search Words Data Structure
  3. Word Search II

9. Heap / Priority Queue (7)

  1. Kth Largest Element in a Stream
  2. Last Stone Weight
  3. K Closest Points to Origin
  4. Kth Largest Element in an Array
  5. Task Scheduler
  6. Design Twitter
  7. Find Median from Data Stream

10. Backtracking (10)

  1. Subsets
  2. Combination Sum
  3. Permutations
  4. Subsets II
  5. Combination Sum II
  6. Word Search
  7. Palindrome Partitioning
  8. Letter Combinations of a Phone Number
  9. N-Queens
  10. Word Search II

11. Graphs (13)

  1. Number of Islands
  2. Clone Graph
  3. Max Area of Island
  4. Pacific Atlantic Water Flow
  5. Surrounded Regions
  6. Rotting Oranges
  7. Walls and Gates
  8. Course Schedule
  9. Course Schedule II
  10. Graph Valid Tree
  11. Number of Connected Components in an Undirected Graph
  12. Redundant Connection
  13. Word Ladder

12. Advanced Graphs (6)

  1. Reconstruct Itinerary
  2. Min Cost to Connect All Points
  3. Network Delay Time
  4. Swim in Rising Water
  5. Alien Dictionary
  6. Cheapest Flights Within K Stops

13. 1-D Dynamic Programming (12)

  1. Climbing Stairs
  2. Min Cost Climbing Stairs
  3. House Robber
  4. House Robber II
  5. Longest Palindromic Substring
  6. Palindromic Substrings
  7. Decode Ways
  8. Coin Change
  9. Maximum Product Subarray
  10. Word Break
  11. Longest Increasing Subsequence
  12. Partition Equal Subset Sum

14. 2-D Dynamic Programming (11)

  1. Unique Paths
  2. Longest Common Subsequence
  3. Best Time to Buy and Sell Stock with Cooldown
  4. Coin Change II
  5. Target Sum
  6. Interleaving String
  7. Longest Increasing Path in a Matrix
  8. Distinct Subsequences
  9. Edit Distance
  10. Burst Balloons
  11. Regular Expression Matching

15. Greedy (8)

  1. Maximum Subarray
  2. Jump Game
  3. Jump Game II
  4. Gas Station
  5. Hand of Straights
  6. Merge Triplets to Form Target Triplet
  7. Partition Labels
  8. Valid Parenthesis String

16. Intervals (6)

  1. Insert Interval
  2. Merge Intervals
  3. Non-Overlapping Intervals
  4. Meeting Rooms
  5. Meeting Rooms II
  6. Minimum Interval to Include Each Query

17. Math & Geometry (8)

  1. Rotate Image
  2. Spiral Matrix
  3. Set Matrix Zeroes
  4. Happy Number
  5. Plus One
  6. Pow(x, n)
  7. Multiply Strings
  8. Detect Squares

18. Bit Manipulation (7)

  1. Single Number
  2. Number of 1 Bits
  3. Counting Bits
  4. Reverse Bits
  5. Missing Number
  6. Sum of Two Integers

Neetcode


NeetCode 250

The NeetCode 250 is the NeetCode 150 plus 100 more problems.
It is the most beginner-friendly list, intended for people completely new to algorithms.


Contents

  1. Arrays & Hashing (22)
  2. Two Pointers (13)
  3. Sliding Window (9)
  4. Stack (14)
  5. Binary Search (14)
  6. Linked List (14)
  7. Trees (23)
  8. Heap / Priority Queue (12)
  9. Backtracking (17)
  10. Tries (4)
  11. Graphs (21)
  12. Advanced Graphs (10)
  13. 1-D Dynamic Programming (17)
  14. 2-D Dynamic Programming (16)
  15. Greedy (14)
  16. Intervals (7)
  17. Math & Geometry (13)
  18. Bit Manipulation (10)

Difficulty

Difficulty Problems
Easy 60
Medium 155
Hard 35
Total 250

The NeetCode 250

1. Arrays & Hashing (22)

  1. Contains Duplicate
  2. Valid Anagram
  3. Two Sum
  4. Group Anagrams
  5. Top K Frequent Elements
  6. Encode and Decode Strings
  7. Product of Array Except Self
  8. Valid Sudoku
  9. Longest Consecutive Sequence
  10. Replace Elements With Greatest Element On Right Side
  11. Is Subsequence
  12. Length of Last Word
  13. Longest Common Prefix
  14. Find Pivot Index
  15. Majority Element
  16. Design HashSet
  17. Design HashMap
  18. First Unique Character in a String
  19. Intersection of Two Arrays
  20. Range Sum Query - Immutable
  21. Sort an Array
  22. Sort Colors

2. Two Pointers (13)

  1. Valid Palindrome
  2. Two Sum II - Input Array Is Sorted
  3. 3Sum
  4. Container With Most Water
  5. Trapping Rain Water
  6. Remove Duplicates From Sorted Array
  7. Move Zeroes
  8. Squares of a Sorted Array
  9. Is Subsequence
  10. Reverse String
  11. Merge Strings Alternately
  12. Backspace String Compare
  13. Boats to Save People

3. Sliding Window (9)

  1. Best Time to Buy and Sell Stock
  2. Longest Substring Without Repeating Characters
  3. Longest Repeating Character Replacement
  4. Permutation in String
  5. Minimum Window Substring
  6. Sliding Window Maximum
  7. Find All Anagrams in a String
  8. Maximum Average Subarray I
  9. Longest Nice Subarray

4. Stack (14)

  1. Valid Parentheses
  2. Min Stack
  3. Evaluate Reverse Polish Notation
  4. Generate Parentheses
  5. Daily Temperatures
  6. Car Fleet
  7. Largest Rectangle in Histogram
  8. Asteroid Collision
  9. Decode String
  10. Remove All Adjacent Duplicates In String II
  11. Online Stock Span
  12. Basic Calculator
  13. Simplify Path
  14. Maximal Rectangle

5. Binary Search (14)

  1. Binary Search
  2. Search a 2D Matrix
  3. Koko Eating Bananas
  4. Find Minimum in Rotated Sorted Array
  5. Search in Rotated Sorted Array
  6. Time Based Key-Value Store
  7. Median of Two Sorted Arrays
  8. Find Peak Element
  9. Search a 2D Matrix II
  10. Find First and Last Position of Element in Sorted Array
  11. Capacity To Ship Packages Within D Days
  12. Split Array Largest Sum
  13. Find the Duplicate Number
  14. H-Index

6. Linked List (14)

  1. Reverse Linked List
  2. Merge Two Sorted Lists
  3. Reorder List
  4. Remove Nth Node From End of List
  5. Copy List With Random Pointer
  6. Add Two Numbers
  7. Linked List Cycle
  8. Find the Duplicate Number
  9. LRU Cache
  10. Merge K Sorted Lists
  11. Reverse Nodes in K-Group
  12. Design Linked List
  13. Intersection of Two Linked Lists
  14. Palindrome Linked List

7. Trees (23)

  1. Invert Binary Tree
  2. Maximum Depth of Binary Tree
  3. Diameter of Binary Tree
  4. Balanced Binary Tree
  5. Same Tree
  6. Subtree of Another Tree
  7. Lowest Common Ancestor of a Binary Search Tree
  8. Binary Tree Level Order Traversal
  9. Binary Tree Right Side View
  10. Count Good Nodes in Binary Tree
  11. Validate Binary Search Tree
  12. Kth Smallest Element in a BST
  13. Construct Binary Tree from Preorder and Inorder Traversal
  14. Binary Tree Maximum Path Sum
  15. Serialize and Deserialize Binary Tree
  16. Implement Trie (Prefix Tree)
  17. Binary Tree Zigzag Level Order Traversal
  18. Populating Next Right Pointers in Each Node
  19. Construct Binary Tree from Inorder and Postorder Traversal
  20. Kth Largest Element in a BST
  21. Convert Sorted Array to Binary Search Tree
  22. Binary Search Tree Iterator
  23. Recover Binary Search Tree

8. Heap / Priority Queue (12)

  1. Kth Largest Element in a Stream
  2. Last Stone Weight
  3. K Closest Points to Origin
  4. Kth Largest Element in an Array
  5. Task Scheduler
  6. Design Twitter
  7. Find Median from Data Stream
  8. Single-Threaded CPU
  9. Reorganize String
  10. Longest Happy String
  11. Car Pooling
  12. IPO

9. Backtracking (17)

  1. Subsets
  2. Combination Sum
  3. Combination Sum II
  4. Permutations
  5. Letter Combinations of a Phone Number
  6. Word Search
  7. Palindrome Partitioning
  8. N-Queens
  9. N-Queens II
  10. Generate Parentheses
  11. Combination Sum III
  12. Letter Case Permutation
  13. Matchsticks to Square
  14. Partition to K Equal Sum Subsets
  15. Word Search II
  16. Sum of All Subset XOR Totals
  17. Beautiful Arrangement

10. Tries (4)

  1. Implement Trie (Prefix Tree)
  2. Design Add and Search Words Data Structure
  3. Word Search II
  4. Maximum XOR for Each Query

11. Graphs (21)

  1. Number of Islands
  2. Max Area of Island
  3. Clone Graph
  4. Walls and Gates
  5. Rotting Oranges
  6. Pacific Atlantic Water Flow
  7. Surrounded Regions
  8. Course Schedule
  9. Course Schedule II
  10. Graph Valid Tree
  11. Number of Connected Components in an Undirected Graph
  12. Redundant Connection
  13. Word Ladder
  14. Find the Town Judge
  15. Open the Lock
  16. Course Schedule IV
  17. Accounts Merge
  18. Evaluate Division
  19. Minimum Height Trees
  20. Network Delay Time
  21. Reconstruct Itinerary

12. Advanced Graphs (10)

  1. Network Delay Time
  2. Reconstruct Itinerary
  3. Min Cost to Connect All Points
  4. Swim in Rising Water
  5. Alien Dictionary
  6. Cheapest Flights Within K Stops
  7. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree
  8. Build a Matrix With Conditions
  9. Path With Minimum Effort
  10. Greatest Common Divisor Traversal

13. 1-D Dynamic Programming (17)

  1. Climbing Stairs
  2. Min Cost Climbing Stairs
  3. House Robber
  4. House Robber II
  5. Longest Palindromic Substring
  6. Palindromic Substrings
  7. Decode Ways
  8. Coin Change
  9. Maximum Product Subarray
  10. Word Break
  11. Longest Increasing Subsequence
  12. Partition Equal Subset Sum
  13. N-th Tribonacci Number
  14. House Robber III
  15. Combination Sum IV
  16. Perfect Squares
  17. Stone Game

14. 2-D Dynamic Programming (16)

  1. Unique Paths
  2. Longest Common Subsequence
  3. Best Time to Buy and Sell Stock with Cooldown
  4. Coin Change II
  5. Target Sum
  6. Interleaving String
  7. Longest Increasing Path in a Matrix
  8. Distinct Subsequences
  9. Edit Distance
  10. Burst Balloons
  11. Regular Expression Matching
  12. Triangle
  13. Minimum Path Sum
  14. Maximal Square
  15. Partition Equal Subset Sum
  16. Stone Game II

15. Greedy (14)

  1. Maximum Subarray
  2. Jump Game
  3. Jump Game II
  4. Gas Station
  5. Hand of Straights
  6. Merge Triplets to Form Target Triplet
  7. Partition Labels
  8. Valid Parenthesis String
  9. Maximum Length of Subarray With Positive Product
  10. Candy
  11. Lemonade Change
  12. Maximum Units on a Truck
  13. Non-overlapping Intervals
  14. Minimum Number of Arrows to Burst Balloons

16. Intervals (7)

  1. Insert Interval
  2. Merge Intervals
  3. Non-overlapping Intervals
  4. Meeting Rooms
  5. Meeting Rooms II
  6. Minimum Number of Arrows to Burst Balloons
  7. Interval List Intersections

17. Math & Geometry (13)

  1. Rotate Image
  2. Spiral Matrix
  3. Set Matrix Zeroes
  4. Happy Number
  5. Plus One
  6. Pow(x, n)
  7. Multiply Strings
  8. Detect Squares
  9. Max Points on a Line
  10. Rectangle Area
  11. Greatest Common Divisor of Strings
  12. Nth Digit
  13. Roman to Integer

18. Bit Manipulation (10)

  1. Single Number
  2. Number of 1 Bits
  3. Counting Bits
  4. Reverse Bits
  5. Missing Number
  6. Sum of Two Integers
  7. Reverse Integer
  8. Bitwise AND of Numbers Range
  9. Power of Two
  10. Add Binary

NeetCode


Archive

More
Stories.

Back To Stories