Day1: (Arrays)
Sort an array of 0’s 1’s 2’s without using extra space or sorting algo
Repeat and Missing Number
Merge two sorted Arrays without extra space
Kadane’s Algorithm
Merge Overlapping Subintervals
Find the duplicate in an array of N+1 integers.
Day2: (Arrays)
Set Matrix Zeros
Pascal Triangle
Next Permutation
Inversion of Array (Using Merge Sort)
Stock Buy and Sell
Ro tate Matrix
Day3: (Arrays/maths)
Search in a 2D matrix
Pow(X,n)
Majority Element (>N/2 times)
Majority Element (>N/3 times)
Grid Unique Paths
Reverse Pairs (Leetcode)
Go through Puzzles from GFG** (Search on own)
Day4: (Hashing)
2 Sum problem
4 Sum problem
Longest Consecutive Sequence
Largest Subarray with 0 sum
Count number of subarrays with given XOR (this clearsa lot of problems)
Longest substring without repeat
Day5: (LinkedList)
Reverse a LinkedList
Find middle of LinkedList
Merge two sorted Linked List
Remove N-th node from back of LinkedList
Delete a given Node when a node is given. (0(1) solution)
Add two numbers as LinkedList
Day6:
Find intersection point of Y LinkedList
Detect a cycle in Linked List
Reverse a LinkedList in groups of size k
Check if a LinkedList is palindrome or not.
Find the starting point of the Loop of LinkedList
Flattening of a LinkedList**
Rotate a LinkedList
Day7: (2-pointer)
Clone a Linked List with random and next pointer
3 sum
Trapping rainwater
Remove Duplicate from Sorted array
Max consecutive ones
Day8: (Greedy)
N meeting in one room
Minimum number of platforms required for a railway
Job sequencing Problem
Fractional Knapsack Problem
Greedy algorithm to find minimum number of coins
Activity Selection (it i
s same as N meeting in one room)
Day9 (Recursion):
Subset Sums
Subset-II
Combination sum-
Combination sum
Palindrome Partitioning
K-th permutation Sequence
Day10: (Recursion and Backtracking)
Print all Permutations of a string/array
N queens Problem
SudokuSolver
M coloring Problem
Rat in a Maze
Word Break -> print all ways
Day11 : (Binary Search)
N-th root of an integer (use binary search) (square root, cube root, ..)
Matrix Median
Find the element that appears once in sorted array, and rest element appears twice (Binary search)
Search element in a sorted and rotated array/ find pivot where it is rotated**
Median of 2 sorted arrays
K-th element of two sorted arrays
Allocate Minimum Number of Pages
Aggressive Cows
Day12: (Bits) (Optional, very rare topic in interviews, but if you have time left, someone might
ask)
Day13: (Stack and Queue)
Implement Stack Using Arrays
Implement Queue Using Arrays
Implement Stack using Queue (using single queue)
Implement Queue using Stack (0(1) amortised method)
Check for balanced parentheses
Next Greater Element
Sort a Stack
Day14:
Next Smaller Element
LRU cache (vvvv. imp)
LFU Cache (Hard, can be ignored)
Largest rectangle in histogram (Do the one pass solution)
Sliding Window maximum
Implement Min Stack
Rotten Orange (Using BFS)
Stock Span Problem
Find maximum of minimums of every window size
The Celebrity Problem
Day15: (String)
Day16: (String)
Day17: (Binary Tree)
Day18: (Binary Tree)
Day 19: (Binary Tree)
Day 20: (Binary Search Tree)
Day21: (BinarySearchTree)
Day22: (Mixed Questions)
Day23: (Graph)
Day24: (Graph)
Day25: (Dynamic Programming)
Day26: (DP)
Day27:
Day28:
Day29:
Day30:
The above sheet was prepared by Raj Vikramaditya. I have documented this sheet here in markdown.
Take a look at my preparation progress with this sheet: https://github.com/SamirPaul1/DSAlgo/tree/main/30-Days-SDE-Sheet-Practice