This list is designed to be followed serially, from #1 to #225. It starts with the absolute basics and gradually introduces new data structures, algorithms, and more complex variations of old ones. Early problems build the foundation for later problems.
- DO NOT jump around. The order is crucial.
- Struggle is part of the process. If a problem feels hard, it's because it's likely introducing a new idea. Spend time trying to solve it before looking at solutions.
- Master the pattern. After solving a problem, ask yourself: What was the key idea? Is this a two-pointer problem? A binary search? A specific greedy choice?
- Spaced Repetition. Occasionally, go back and re-solve a random problem from 20-30 spots earlier in the list to ensure the concepts stick.
(Focus: Basic Array/String manipulation, Hashing, Two Pointers)
- Two Sum (Easy)
- Contains Duplicate (Easy)
- Valid Anagram (Easy)
- Best Time to Buy and Sell Stock (Easy)
- Valid Palindrome (Easy)
- Merge Sorted Array (Easy)
- Length of Last Word (Easy)
- Remove Duplicates from Sorted Array (Easy)
- Remove Element (Easy)
- Find the Index of the First Occurrence in a String (Easy)
- Maximum Subarray (Medium)
- Majority Element (Easy)
- Move Zeroes (Easy)
- Missing Number (Easy)
- Fizz Buzz (Easy)
- Single Number (Easy)
- Pascal's Triangle (Easy)
- Ransom Note (Easy)
- Squares of a Sorted Array (Easy)
- Group Anagrams (Medium)
- Two Sum II - Input Array Is Sorted (Medium)
- Product of Array Except Self (Medium)
- Top K Frequent Elements (Medium)
- Sort Colors (Medium)
- 3Sum (Medium)
- Container With Most Water (Medium)
- Find All Numbers Disappeared in an Array (Easy)
- Happy Number (Easy)
- Verifying an Alien Dictionary (Easy)
- Longest Common Prefix (Easy)
- Backspace String Compare (Easy)
- Is Subsequence (Easy)
- Longest Palindrome (Easy)
- Find Pivot Index (Easy)
- First Unique Character in a String (Easy)
- Unique Email Addresses (Easy)
- Isomorphic Strings (Easy)
- Word Pattern (Easy)
- Summary Ranges (Easy)
- Range Sum Query - Immutable (Easy)
- Maximum Product of Three Numbers (Easy)
- Minimum Moves to Equal Array Elements (Medium)
- Rotate Array (Medium)
- Encode and Decode Strings (Medium) (LeetCode Premium / Available on NeetCode)
- Spiral Matrix (Medium)
- Set Matrix Zeroes (Medium)
- Rotate Image (Medium)
- Minimum Moves to Equal Array Elements II (Medium)
- Subarray Sum Equals K (Medium)
- Find the Duplicate Number (Medium)
(Focus: Stacks, Linked Lists, Binary Search, Sliding Window, Basic Trees)
- Valid Parentheses (Easy)
- Min Stack (Medium)
- Evaluate Reverse Polish Notation (Medium)
- Generate Parentheses (Medium)
- Daily Temperatures (Medium)
- Car Fleet (Medium)
- Largest Rectangle in Histogram (Hard)
- Reverse Linked List (Easy)
- Merge Two Sorted Lists (Easy)
- Linked List Cycle (Easy)
- Palindrome Linked List (Easy)
- Remove Nth Node From End of List (Medium)
- Reorder List (Medium)
- Add Two Numbers (Medium)
- LRU Cache (Medium)
- Copy List with Random Pointer (Medium)
- Merge k Sorted Lists (Hard)
- Reverse Nodes in k-Group (Hard)
- Binary Search (Easy)
- Search a 2D Matrix (Medium)
- Find Minimum in Rotated Sorted Array (Medium)
- Search in Rotated Sorted Array (Medium)
- Time Based Key-Value Store (Medium)
- Koko Eating Bananas (Medium)
- Median of Two Sorted Arrays (Hard)
- Longest Substring Without Repeating Characters (Medium)
- Longest Repeating Character Replacement (Medium)
- Permutation in String (Medium)
- Minimum Window Substring (Hard)
- Sliding Window Maximum (Hard)
- Invert Binary Tree (Easy)
- Maximum Depth of Binary Tree (Easy)
- Diameter of Binary Tree (Easy)
- Same Tree (Easy)
- Subtree of Another Tree (Easy)
- Balanced Binary Tree (Easy)
- Lowest Common Ancestor of a Binary Search Tree (Easy)
- Binary Tree Level Order Traversal (Medium)
- Binary Tree Right Side View (Medium)
- Count Good Nodes in Binary Tree (Medium)
- Validate Binary Search Tree (Medium)
- Kth Smallest Element in a BST (Medium)
- Construct Binary Tree from Preorder and Inorder Traversal (Medium)
- Lowest Common Ancestor of a Binary Tree (Medium)
- Binary Tree Maximum Path Sum (Hard)
- Serialize and Deserialize Binary Tree (Hard)
- Implement Trie (Prefix Tree) (Medium)
- Design Add and Search Words Data Structure (Medium)
- Word Search (Medium)
- Word Search II (Hard)
- Kth Largest Element in a Stream (Easy)
- Last Stone Weight (Easy)
- K Closest Points to Origin (Medium)
- Kth Largest Element in an Array (Medium)
- Task Scheduler (Medium)
- Design Twitter (Medium)
- Find Median from Data Stream (Hard)
- Subsets (Medium)
- Combination Sum (Medium)
- Permutations (Medium)
- Subsets II (Medium)
- Combination Sum II (Medium)
- Permutations II (Medium)
- Letter Combinations of a Phone Number (Medium)
- Palindrome Partitioning (Medium)
- N-Queens (Hard)
- Number of Islands (Medium)
- Max Area of Island (Medium)
- Clone Graph (Medium)
- Pacific Atlantic Water Flow (Medium)
- Surrounded Regions (Medium)
- Rotting Oranges (Medium)
- Walls and Gates (Medium) (LeetCode Premium / Available on NeetCode)
- Course Schedule (Medium)
- Course Schedule II (Medium)
(Focus: Greedy, DP, Advanced Graph, Math/Misc)
- Climbing Stairs (Easy)
- Min Cost Climbing Stairs (Easy)
- House Robber (Medium)
- House Robber II (Medium)
- Longest Palindromic Substring (Medium)
- Palindromic Substrings (Medium)
- Decode Ways (Medium)
- Coin Change (Medium)
- Maximum Product Subarray (Medium)
- Word Break (Medium)
- Longest Increasing Subsequence (Medium)
- Partition Equal Subset Sum (Medium)
- Unique Paths (Medium)
- Jump Game (Medium)
- Gas Station (Medium)
- Merge Intervals (Medium)
- Non-overlapping Intervals (Medium)
- Insert Interval (Medium)
- Meeting Rooms (Easy) (LeetCode Premium / Available on NeetCode)
- Meeting Rooms II (Medium) (LeetCode Premium / Available on NeetCode)
- Graph Valid Tree (Medium) (LeetCode Premium / Available on NeetCode)
- Number of Connected Components in an Undirected Graph (Medium) (LeetCode Premium / Available on NeetCode)
- Redundant Connection (Medium)
- Word Ladder (Hard)
- Network Delay Time (Medium)
- Cheapest Flights Within K Stops (Medium)
- Reverse Bits (Easy)
- Number of 1 Bits (Easy)
- Counting Bits (Easy)
- Sum of Two Integers (Medium)
- Combination Sum IV (Medium)
- House Robber III (Medium)
- Target Sum (Medium)
- Interleaving String (Medium)
- Longest Common Subsequence (Medium)
- Edit Distance (Medium)
- Best Time to Buy and Sell Stock with Cooldown (Medium)
- Best Time to Buy and Sell Stock with Transaction Fee (Medium)
- Coin Change II (Medium)
- Burst Balloons (Hard)
- Distinct Subsequences (Hard)
- Regular Expression Matching (Hard)
- Wildcard Matching (Hard)
- Partition to K Equal Sum Subsets (Medium)
- Find All Anagrams in a String (Medium)
- Minimum Height Trees (Medium)
- Reconstruct Itinerary (Hard)
- Accounts Merge (Medium)
- Longest Consecutive Sequence (Medium)
- Alien Dictionary (Hard) (LeetCode Premium / Available on NeetCode)
- Hand of Straights (Medium)
- Binary Tree Zigzag Level Order Traversal (Medium)
- Next Permutation (Medium)
- Trapping Rain Water (Hard)
- Basic Calculator (Hard)
- Text Justification (Hard)
- Integer to English Words (Hard)
- Minimum Knight Moves (Medium)
- Jump Game II (Medium)
- Find the Celebrity (Medium) (LeetCode Premium)
- Pow(x, n) (Medium)
- Sqrt(x) (Easy)
- Search Suggestions System (Medium)
- Candy (Hard)
- Swim in Rising Water (Hard)
- Path with Maximum Probability (Medium)
- Connecting Cities With Minimum Cost (Medium) (LeetCode Premium)
- Min Cost to Connect All Points (Medium)
- Design In-Memory File System (Hard)
- All O`one Data Structure (Hard)
- Find First and Last Position of Element in Sorted Array (Medium)
- Count of Smaller Numbers After Self (Hard)
- Longest Increasing Path in a Matrix (Hard)
- Range Sum Query 2D - Immutable (Medium)
- Maximum Frequency Stack (Hard)
- Word Break II (Hard)
- Palindrome Pairs (Hard)
- Russian Doll Envelopes (Hard)
- The Skyline Problem (Hard)
- Shortest Path in a Grid with Obstacles Elimination (Hard)
- Sudoku Solver (Hard)
- Split Array Largest Sum (Hard)
- LFU Cache (Hard)
- Maximum Gap (Medium)
- Count Vowels Permutation (Hard)
- Number of Ways to Form a Target String Given a Dictionary (Hard)
- Maximum Number of Events That Can Be Attended (Medium)
- Shortest Path Visiting All Nodes (Hard)
- Number of Good Paths (Hard)
- Frog Jump (Hard)
- Max Points on a Line (Hard)
- Freedom Trail (Hard)
- Stone Game IV (Hard)
- Race Car (Hard)
- Remove Invalid Parentheses (Hard)
- Integer to Roman (Medium)
- Roman to Integer (Easy)
- Simplify Path (Medium)
- Champagne Tower (Medium)
- Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree (Medium) (LeetCode Premium)
This list will give you a comprehensive tour of the most important patterns in programming interviews and competitive programming. Good luck, and enjoy the journey!
ok thanks a lot bro, love and support!