This list contains problems of varying difficulty levels, ranging from beginner to advanced. If you're just starting, I recommend solving the easier problems first before moving on to the harder ones.
📌 How to use this list?
- Problems are linked directly to LeetCode. Click on a problem to access it.
- Try solving problems in increasing difficulty order.
- Two Sum
- Apply Operations to an Array
- Largest Positive Integer That Exists With Its Negative
- Bag of Tokens
- Rotate Array
- Circular Array Loop
- Minimize Maximum Pair Sum in Array
- Maximum Matching of Players With Trainers
- Sort Colors
- Search a 2D Matrix
- Find K-th Smallest Pair Distance
- Last Substring in Lexicographical Order
- Rearrange Array Elements by Sign
- Next Permutation
- Minimum Difference Between Highest and Lowest of K Scores
- Longest Even Odd Subarray with Threshold
- Defuse the Bomb
- Replace the Substring for Balanced String
- Count Number of Nice Subarrays
- Binary Subarrays with Sum
- Max Consecutive Ones III
- K-Radius Subarray Averages
- Grumpy Bookstore Owner
- Maximum Number of Vowels in a Substring of Given Length
- Maximum Points You Can Obtain from Cards
- Minimum Positive Sum Subarray
- Maximum Subarray With Equal Products
- Combination Sum
- Combination Sum II
- Permutations
- Permutations II
- Subsets
- Subsets II
- Palindrome Partitioning
- Generate Parentheses
- Letter Combinations of a Phone Number
- Word Search
- N-Queens
- N-Queens II
- Sudoku Solver
- Combinations
- Combination Sum III
- Letter Case Permutation
- Expression Add Operators
- 24 Game
- Restore IP Addresses
- The K-th Lexicographical String of All Happy Strings of Length N
- Path with Maximum Gold
- Merge Two Sorted Lists
- Reverse Linked List
- Reverse Nodes in k-Group
- Delete Node in a Linked List
- Swapping Nodes in a Linked List
- Odd Even Linked List
- Rotate List
- Intersection of Two Linked Lists
- Linked List Cycle II
- Flatten Binary Tree to Linked List
- LRU Cache
- Add Two Numbers
- Delete the Middle Node of a Linked List
- Convert Binary Number in a Linked List to Integer
- Spiral Matrix IV
- Split Linked List in Parts
- Remove Nth Node From End of List
- Swap Nodes in Pairs
- Insert Greatest Common Divisors in Linked List
- Copy List with Random Pointer
- Implement Queue using Stacks
- Implement Stack using Queues
- First Unique Character in a String
- Sliding Window Maximum
- First Unique Character in a String (Hash Table)
- Kth Largest Element in a Stream
- Number of Recent Calls
- Reveal Cards in Increasing Order
- Find the Winner of the Circular Game
- Design Circular Deque
- Minimum Number of K Consecutive Bit Flips
- Count Subarrays with Fixed Bounds
- Min Stack
- Implement Stack using Queues
- Simplify Path
- Valid Parentheses
- Online Stock Span
- Next Greater Element I
- Validate Stack Sequences
- Remove All Adjacent Duplicates in String
- Remove All Adjacent Duplicates in String II
- Removing Stars from a String
- Evaluate Reverse Polish Notation
- Daily Temperatures
- Remove K Digits
- Minimum Add to Make Parentheses Valid
- Intersection of Two Arrays
- Largest Positive Integer That Exists with Its Negative
- Next Greater Element I
- Longest Substring Without Repeating Characters
- Roman to Integer
- Valid Anagram
- Most Frequent Number Following Key in an Array
- N-Repeated Element in Size 2N Array
- Count Number of Pairs With Absolute Difference K
- Kth Distinct String in an Array
- Group Anagrams
- Construct Binary Tree from Preorder and Inorder Traversal
- Majority Element II
- Sort Characters By Frequency
- Subarray Sum Equals K
- Longest Substring Without Repeating Characters
- 4Sum II
- Longest Repeating Character Replacement
- Find All Anagrams in a String
- Find All Duplicates in an Array
- Bulls and Cows
- Count Number of Bad Pairs
- Equal Row and Column Pairs
- Unique Length-3 Palindromic Subsequences
- Optimal Partition of String
- Minimum Rounds to Complete All Tasks
- Max Points on a Line
- First Missing Positive
- Naming a Company
- Word Ladder
- Substring with Concatenation of All Words
- Minimum Window Substring
- Search Insert Position
- Find Smallest Letter Greater Than Target
- Missing Number
- Binary Search
- The K Weakest Rows in a Matrix
- Sqrt(x)
- First Bad Version
- Kth Missing Positive Number
- Intersection of Two Arrays II
- Max Consecutive Ones III
- Single Element in a Sorted Array
- Search in Rotated Sorted Array
- Peak Index in a Mountain Array
- Find First and Last Position of Element in Sorted Array
- Maximum Number of Integers to Choose From a Range I
- Search in Rotated Sorted Array II
- Minimized Maximum of Products Distributed to Any Store
- Find Minimum in Rotated Sorted Array
- Two Sum II - Input Array Is Sorted
- Minimum Size Subarray Sum
- Find the Duplicate Number
- Longest Increasing Subsequence
- Kth Smallest Element in a Sorted Matrix
- Capacity to Ship Packages Within D Days
- Minimum Number of Days to Make M Bouquets
- K-Diff Pairs in an Array
- Valid Triangle Number
- Maximum Frequency of an Element After Performing Operations I
- Smallest Substring With Identical Characters 1
- Smallest Substring With Identical Characters 2
- Binary Tree Inorder Traversal
- Binary Tree Preorder Traversal
- Binary Tree Postorder Traversal
- Diameter of Binary Tree
- Subtree of Another Tree
- Same Tree
- Symmetric Tree
- Maximum Depth of Binary Tree
- Convert Sorted Array to Binary Search Tree
- Merge Two Binary Trees
- Balanced Binary Tree
- Count Complete Tree Nodes
- Invert Binary Tree
- Search in a Binary Search Tree
- Validate Binary Search Tree
- Kth Largest Element in a Stream
- Minimum Distance Between BST Nodes
- Range Sum of BST
- Univalued Binary Tree
- Path Sum
- Binary Tree Level Order Traversal
- Unique Binary Search Trees
- Binary Tree Zigzag Level Order Traversal
- Validate Binary Search Tree
- Recover Binary Search Tree
- Maximum Width of Binary Tree
- Construct Binary Tree From Proorder and Inorder Traversal
- Construct Binary Tree From Inorder and Postorder Traversal
- Delete Node In A BST
- Flatten Binary Tree To Linked List
- Binary Search Tree Iterator
- Binary Search Tree To Greater Sum Tree
- Kth Smallest Element In a BST
- Kth Largest Sum In A Binary Tree
- Populationg Next Right Pointer In Each Node
- Lowest Common Ancestor Of A Binary Search Tree
- Lowest Common Ancestor Of A Binary Tree
- Binary Tree Right Side View
- Find Bottom Left Tree Value
- Convert Sorted List To Binary Search Tree
- Binary Tree Level Order Traversal 2
- Convert Sorted List To Binary Search Tree
- Maximum Level Sum Of A Binary Tree
- Find Duplicate Subtrees
- Sum Root To Leaf Numbers
- Convert Bst To Greater Tree
- Path Sum 2
- Populating Next Right Pointers In Each Node 2
- Find Largest Value In Each Tree Row
- Longest Univalue Path
- Verify Preorder Serialization Of A Binary Tree
- Path Sum 3
- Binary Tree Maximum Path Sum
- Maximum Sum Bst In Binary Tree
- Serialize And Deserialize Binary Tree
- Merge Bsts To Create Single
- Recover A Tree From Preorder Traversal
- Vertical Order Traversal Of A Binary Tree
- Kth Ancestor Of A Tree Node
- Find The Town Judge
- Find If Path Exisxts In Graph
- Find Center Of Star Graph
- Number of Provinces
- Keys and Rooms
- Evaluate Division
- Bus Routes
- Network Delay Time
- Number of Ways to Arrive at Destination
- Second Minimum Time To Reach Destination
- Minimum Time to Visit a Cell in a Grid
- Minimum Cost to Make at Least One Valid Path in a Grid
- Swim In Rising Water
- Path With Minimum Effort
- Parh With Maximum Probability
- Shortest Path In Binary Matrix
- Minimum Height Trees
- Loud And Rich
- Reachable Nodes In Subdivided Graph
- Find the City With the Smallest Number of Neighbors at a Threshold Distance
- Coursr Schedule 4
- Count The Number Of Houses At A Certain Distance 1
- Cheapest Flights Within K Stops
- Find Minimum Time To Reach Last Room 1
- Minimum Cost To Convert String 1
- Design Graph With Shortest Path Calculator
- Min Cost To Connect All Points
- Redundant Connection
- Course Schedule
- Course Schedule 2
- Is Grapth Bipattite
- Number Of Possible Sets Of Closing Branches
- Minimum Number of Vertices to Reach All Nodes
- Min Cost To Connect All points
- Build a Matrix With Conditions
- Sort Items by Groups Respecting Dependencies
- Minimum Height Trees
- Find All Possible Recipes From Given Supplies
- All Ancestors Of A Node In A Directed Acyclic Graph
- Most Stones Removed with Same Row or Column
- Number of Operations to Make Network Connected
- Find All People With Secret
- Minimize Malware Spread
- Possible Bipartition
- Clone Graph
- All Paths from Source to Target
- Detect Cycles In 2D Grid
- Flower Planting With No Adjacent
- Divide Nodes Into The Maximum Number of Groups
- Valid Arrangement of Pairs
- Reconstruct Itinerary
- Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree
- Remove Max Number of Edges to Keep Graph Fully Traversable
- Critical Connections In A Network
- Climbing Stairs
- Fibonacci Number
- N-th Tribonacci Number
- Min Cost Climbing Stairs
- House Robber
- Maximum Amount of Money Robot Can Earn
- Pascal's Triangle
- Pascal's Triangle II
- Counting Bits
- Divisor Game
- Ugly Number
- Ugly Number II
- House Robber II
- Integer Break
- House Robber III
- Frog Jump
- Combination Sum IV
- Coin Change II
- Word Break
- Word Break II
- Target Sum
- Perfect Squares
- Interleaving String
- Minimum Number of Refueling Stops
- Unique Paths
- Unique Paths II
- Triangle