DSA sheet by Arsh
This curated list provided by Arsh contains sorted by topic and difficulty to help you systematically grind and improve your problem-solving skills.
Array Problems
Easy
- Find the Duplicate Number
- Sort Colors
- Remove Duplicates from Sorted Array
- Set Matrix Zeroes
- Move Zeroes
- Best Time to Buy and Sell Stock
- Chocolate Distribution Problem
- Two Sum
- Best Time to Buy and Sell Stock II
Medium
- Subarray Sums Divisible by K
- Find All Duplicates in an Array
- Container with Most Water
- 3Sum
- 4Sum
- Maximum Points You Can Obtain from Cards
- Subarray Sum Equals K
- Spiral Matrix
- Word Search
- Jump Game
- Merge Sorted Array
- Majority Element
- Reverse Pairs
- Print All Possible Combinations of R Elements in a Given Array of Size N
- Game of Life
Hard
- Max Value of Equation
- Insert Delete GetRandom O(1) - Duplicates Allowed
- Largest Rectangle in Histogram
String Problems
Easy
- Valid Parentheses
- Print All Duplicates in the Input String
- Implement strStr()
- Longest Common Prefix
- Valid Palindrome II
Medium
- Integer to Roman
- Generate Parentheses
- Simplify Path
- Smallest Window in a String Containing All the Characters of Another String
- Reverse Words in a String
- Rabin-Karp Algorithm for Pattern Searching
- Group Anagrams
- Word Wrap
- Basic Calculator II
Hard
- Valid Number
- Integer to English Words
- Minimum Window Substring
- Text Justification
- Boyer-Moore Algorithm for Pattern Searching
- Distinct Subsequences
Matrix Problems
Medium
- Maximum Size Rectangle Binary Sub-matrix with 1s
- Find Number of Islands
- Replace O with X Surrounded by X
- Spiral Matrix
- Rotate Image
Mathematical Problems
Easy
- Minimum Moves to Equal Array Elements
- Add Binary
- Maximum Product of Three Numbers
- Excel Sheet Column Title
- Happy Number
- Palindrome Number
- Missing Number
- Reverse Integer
- Power of Two
Medium
Sorting and Searching
Easy
- Permute Two Arrays Sum Every Pair Greater Equal K
- Ceiling in a Sorted Array
- Find a Pair with the Given Difference
Medium
- Check Reversing Sub-array Make Array Sorted
- Radix Sort
- A Product Array Puzzle
- Make Array Elements Equal Minimum Cost
- Find Peak Element
Hard
- Allocate Minimum Number of Pages
- Minimum Number Swaps Required to Sort Array
- AGGRCOW
- Search in Rotated Sorted Array
- Count of Smaller Numbers After Self
- Split Array Largest Sum
Linked List
Easy
- Middle of the Linked List
- Linked List Cycle
- Convert Binary Number in a Linked List to Integer
- Remove Duplicates from Sorted List
- Sort a Linked List of 0s, 1s, or 2s
- Remove Linked List Elements
- Merge Two Sorted Lists
- Multiply Two Numbers Represented by Linked Lists
- Intersection of Two Linked Lists
Medium
- Flatten a Multilevel Doubly Linked List
- Reverse Linked List II
- Linked List Random Node
- Rearrange a Linked List
Hard
Recursion and Backtracking
Easy
- Generate Parentheses
- Combinations
- Combination Sum
- Subsets
- Pascal's Triangle
- Permutations
- Subsets II
- Letter Combinations of a Phone Number