This repository contains solutions to LeetCode problems organized by difficulty level (Easy, Medium, Hard). All solutions are implemented in JavaScript with Python implementations included as comments.
- Sort Colors ✅
- Find All Duplicates in an Array ✅
- Missing Number ✅
- Find Duplicate Number ✅
- Remove Duplicates from Sorted Array ✅
- Remove Duplicates from Sorted Array II ✅
- Find K Closest Elements ✅
- Find Missing Positive Integer
- Find Peak Element ✅
- Find the Maximum Sum Subarray (Kadane's Algorithm) ✅
- Kth Largest Element in an Array ✅
- Top K Frequent Elements ✅
- Longest Consecutive Sequence ✅
- Find the Smallest Range Covering Elements from K Lists
- Heapsort
- Maximum Gap
- Wiggle Sort II
- Search in Rotated Sorted Array
- Search in Rotated Sorted Array II
- Find First and Last Position in a Sorted Array
- Search Insert Position
- Find Minimum in Rotated Sorted Array
- Median of Two Sorted Arrays ✅
- Search a 2D Matrix
- Valid Palindrome ✅
- Longest Substring Without Repeating Characters ✅
- Find All Anagrams in a String ✅
- Longest Palindromic Substring
- Minimum Window Substring
- Summary Ranges ✅
- Merge Intervals ✅
- Insert Interval ✅
- Minimum Absolute Difference
- Minimum Number of Arrows to Burst Balloons ✅
- Maximum Number of Events That Can Be Attended
- Intersection of Two Arrays II
- Rotate Image
- Set Matrix Zeroes
- Spiral Matrix
- Word Search
- Find All Anagrams in a String ✅
- Subarray Sum Equals K ✅
- Minimum Size Subarray Sum ✅
- Maximum Product Subarray ✅
- Find First and Last Position in a Sorted Array
- Count and Say ✅
- Valid Anagram ✅
- Ransom Note ✅
- Group Anagrams ✅
- Isomorphic Strings ✅
- Two Sum ✅
- Contains Duplicate II ✅
- Happy Number ✅
- Valid Parentheses ✅
- Min Stack ✅
- Backspace String Compare
- Simplify Path ✅
- Evaluate Reverse Polish Notation ✅
- Daily Temperatures
- Decode String
- Basic Calculator ✅
- Car Fleet
- Generate Parentheses
- Asteroid Collision
- Basic Calculator II
- Maximum Frequency Stack
- Longest Valid Parentheses
- Largest Rectangle in Histogram
- Reverse Linked List ✅
- Merge Two Sorted Lists ✅
- Linked List Cycle ✅
- Middle of the Linked List ✅
- Palindrome Linked List ✅
- Remove Nth Node From End of List ✅
- Copy List with Random Pointer ✅
- Add Two Numbers ✅
- Reorder List ✅
- Swap Nodes in Pairs ✅
- Odd Even Linked List ✅
- Sort List ✅
- Reverse Nodes in k-Group ✅
- Merge K Sorted Lists ✅
- LRU Cache ✅
- Invert Binary Tree ✅
- Same Tree ✅
- Symmetric Tree ✅
- Maximum Depth of Binary Tree
- Balanced Binary Tree
- Subtree of Another Tree
- Lowest Common Ancestor of a Binary Search Tree
- Diameter of Binary Tree
- Path Sum
- Count Complete Tree Nodes
- Validate Binary Search Tree ✅
- Kth Smallest Element in a BST ✅
- Construct Binary Tree from Preorder and Inorder Traversal
- Binary Tree Level Order Traversal ✅
- Binary Tree Zigzag Level Order Traversal
- Binary Tree Right Side View
- Count Good Nodes in Binary Tree
- Flatten Binary Tree to Linked List
- Path Sum II
- Populating Next Right Pointers in Each Node II
- Sum Root to Leaf Numbers
- Minimum Absolute Difference in BST
- Binary Tree Maximum Path Sum
- Serialize and Deserialize Binary Tree
- Recover Binary Search Tree
- Implement Trie ✅
- Design Add and Search Words Data Structure ✅
- Longest Word in Dictionary ✅
- Replace Words ✅
- Word Search II ✅
- Kth Largest Element in a Stream
- Last Stone Weight
- Kth Largest Element in an Array ✅
- K Closest Points to Origin
- Task Scheduler
- Top K Frequent Words
- Find K Closest Elements ✅
- Merge K Sorted Lists
- Find Median from Data Stream
- Sliding Window Median
- N-Queens
- Sudoku Solver
- Word Search
- Subsets
- Permutations
- Combination Sum
- Generate Parentheses
- Palindrome Partitioning
- Letter Combinations of a Phone Number
- Restore IP Addresses
- Flood Fill
- Number of Islands
- Max Area of Island
- Clone Graph
- Course Schedule
- Course Schedule II
- Pacific Atlantic Water Flow
- Rotting Oranges
- Surrounded Regions
- Walls and Gates
- Graph Valid Tree
- Number of Connected Components in an Undirected Graph
- Redundant Connection
- Find Eventual Safe States
- Network Delay Time
- Path with Maximum Probability
- Word Ladder
- Shortest Path in a Grid with Obstacles Elimination
- Alien Dictionary
- Find Strongly Connected Components
- Climbing Stairs ✅
- Coin Change ✅
- Word Break ✅
- House Robber ✅
- Paint House
- Unique Paths II
- 0/1 Knapsack Problem
- Palindromic Substrings
- Decode Ways
- Unique Paths
- Shortest Common Supersequence
- Interleaving String
- House Robber II
- Minimum Path Sum
- Maximal Square
- Longest Increasing Subsequence
- Can I Win
- Ones and Zeroes
- Longest Palindromic Subsequence
- Partition Equal Subset Sum / Partition to K Equal Sum Subset
- Cheapest Flights Within K Stop
- Longest Arithmetic Sequence
- Last Stone Weight II
- Filling Bookcase Shelves
- Longest Common Subsequence
- Dice Roll Sum
- Longest Valid Parentheses
- Wildcard Matching
- Edit Distance
- Best Time to Buy and Sell Stocks
- Burst Balloons
- Minimum Cost to Merge Stones
- Minimum Difficulty of a Job Schedule
- Activity Selection Problem
- Huffman Encoding
- Minimum Platforms
- Job Sequencing Problem
- Jump Game
- Gas Station ✅
- Partition Labels
- Dijkstra's Algorithm
- Trapping Rain Water ✅
- Largest Rectangle in Histogram
- Container With Most Water ✅
- Reorganize String
- Single Number
- Number of 1 Bits
- Counting Bits
- Reverse Bits
- Add Binary
- Divide Two Integers
- Single Number II
- Bitwise AND of Numbers Range
- Palindrome Number
- Plus One
- Pow(x, n)
- Factorial Trailing Zeroes
- Multiply Strings