STRIVER DSA SHEET
Takeuforward Website
Sheet Link
Day 1 (Arrays)
- Sort an array of 0’s 1’s 2’s without using extra space or sorting algo - Cpp Soultion
- Repeat and Missing Number - Cpp Soultion
- Merge two sorted Arrays without extra space - Cpp Soultion
- Kadane’s Algorithm - Cpp Soultion
- Merge Overlapping Subintervals - Cpp Soultion
- Find the duplicate in an array of N+1 integers - Cpp Soultion
Day 2 (Arrays)
- Set Matrix Zeroes - Cpp Soultion
- Pascal’s Triangle - Cpp Soultion
- Next Permutation - Cpp Soultion
- Count Inversions in an array - Cpp Soultion
- Best Time to Buy and Sell Stock - Cpp Soultion
- Rotate Image - Cpp Soultion
Day 3 (Array/Maths)
- Search a 2D Matrix - Cpp Soultion
- Pow(x, n) - Cpp Soultion
- Majority Element - Cpp Soultion
- Majority Element II - Cpp Soultion
- Unique Paths - Cpp Soultion
- Reverse Pairs - Cpp Soultion
Day 4 (Hashing)
- Two Sum - Cpp Soultion
- 4Sum - Cpp Soultion
- Longest Consecutive Sequence - Cpp Soultion
- Largest subarray with 0 sum - Cpp Soultion
- Count the number of subarrays having a given XOR
- Longest Substring Without Repeating Characters - Cpp Soultion
Day 5 (LinkedList)
- Reverse Linked List - Cpp Soultion
- Middle of the Linked List - Cpp Soultion
- Merge Two Sorted Lists - Cpp Soultion
- Remove Nth Node From End of List - Cpp Soultion
- Delete Node in a Linked List - Cpp Soultion
- Add Two Numbers - Cpp Soultion
Day 6 (LinkedList 2)
- Intersection of Two Linked Lists - Cpp Soultion
- Linked List Cycle - Cpp Soultion
- Reverse Nodes in k-Group - Cpp Soultion
- Palindrome Linked List - Cpp Soultion
- Linked List Cycle II - Cpp Soultion
- Flattening a Linked List - Cpp Soultion
- Rotate List - Cpp Soultion
Day 7 (2 Pointers)
- Copy List with Random Pointer - Cpp Soultion
- 3Sum - Cpp Soultion
- Trapping Rain Water - Cpp Soultion
- Remove Duplicates from Sorted Array - Cpp Soultion
- Max Consecutive Ones - Cpp Soultion
Day 8 (Greedy)
- N meetings in one room - Cpp Soultion
- Minimum Platforms - Cpp Soultion
- Job Sequencing Problem - Cpp Soultion
- Fractional Knapsack - Cpp Soultion
- Greedy Algorithm to find Minimum number of Coins
Day 9 (Recursion)
- Subset Sums - Cpp Soultion
- Subsets II - Cpp Soultion
- Combination Sum - Cpp Soultion
- Combination Sum II - Cpp Soultion
- Palindrome Partitioning - Cpp Soultion
- Permutation Sequence - Cpp Soultion
Day 10 (Recursion, Backtrack)
- Permutations - Cpp Soultion
- N-Queens - Cpp Soultion
- Sudoku Solver - Cpp Soultion
- m Coloring Problem
- Rat in a Maze - Cpp Soultion
- Word Break - Cpp Soultion
Day 11 (Divide n Conquer)
- Calculating n-th real root using binary search
- Median in a row-wise sorted Matrix - Cpp Soultion
- Single Element in a Sorted Array - Cpp Soultion
- Search in Rotated Sorted Array - Cpp Soultion
- Median of Two Sorted Arrays - Cpp Soultion
- K-th Element of Two Sorted Arrays
Day 12 (Bits)
- Power of Two - Cpp Soultion
- Counting Bits - Cpp Soultion
- Divide two integers without using multiplication, division and mod operator
- Subsets - Cpp Soultion
- Find MSB In O(1) - Cpp Soultion
- Calculate square of a number without using *, / and pow()
Day 13 (Stack/Queues)
- Implement stack using array - Cpp Soultion
- Implement Queue using array - Cpp Soultion
- Implement Stack using Linked List - Cpp Soultion
- Implement Queue using Linked List - Cpp Soultion
- BFS of graph - Cpp Soultion
- Implement Stack using Queues - Cpp Soultion
- Implement Queue using Stacks - Cpp Soultion
- Valid Parentheses - Cpp Soultion
- Next Greater Element - Cpp Soultion
Day 14 (Miscellaneous)
- Nearest Smaller Element - Cpp Soultion
- LRU Cache - Cpp Soultion
- Largest Rectangle in Histogram - Cpp Soultion
- Sliding Window Maximum - Cpp Soultion
- Min Stack - Cpp Soultion
- Rotting Oranges - Cpp Soultion
Day 15 (Strings)
- Reverse Words in a String - Cpp Soultion
- Longest Palindromic Substring - Cpp Soultion
- Roman to Integer - Cpp Soultion
- Integer to Roman - Cpp Soultion
- Implement strStr - Cpp Soultion
- String to Integer - Cpp Soultion
- Longest Common Prefix - Cpp Soultion
- Rabin-Karp Algorithm for Pattern Searching
Day 16 (Strings)
- Z algorithm (Linear time pattern searching Algorithm)
- KMP Algorithm for Pattern Searching
- Minimum characters to be added at front to make string palindrome
- Valid Anagram - Cpp Soultion
- Count and Say - Cpp Soultion
- Compare Version Numbers - Cpp Soultion
Day 17 (Binary Tree)
- Binary Tree Inorder Traversal - Cpp Soultion
- Binary Tree Preorder Traversal - Cpp Soultion
- Binary Tree Postorder Traversal - Cpp Soultion
- Binary Tree Right Side View - Cpp Soultion
- Bottom View of Binary Tree - Cpp Soultion
- Top View of Binary Tree - Cpp Soultion
Day 18 ()
- Binary Tree Level Order Traversal - Cpp Soultion
- Binary Tree Zigzag Level Order Traversal - Cpp Soultion
- Maximum Depth of Binary Tree - Cpp Soultion
- Diameter of Binary Tree - Cpp Soultion
- Balanced Binary Tree - Cpp Soultion
- Lowest Common Ancestor of a Binary Tree - Cpp Soultion
- Same Tree - Cpp Soultion
Day 19 (Binary Tree)
- Binary Tree Maximum Path Sum - Cpp Soultion
- Construct Binary Tree from Preorder and Inorder Traversal - Cpp Soultion
- Construct Binary Tree from Inorder and Postorder Traversal - Cpp Soultion
- Symmetric Tree - Cpp Soultion
- Flatten Binary Tree to Linked List - Cpp Soultion
Day 20 (Binary Search Tree)
- Populating Next Right Pointers in Each Node - Cpp Soultion
- Search in a Binary Search Tree - Cpp Soultion
- Convert Sorted Array to Binary Search Tree - Cpp Soultion
- Validate Binary Search Tree - Cpp Soultion
- Lowest Common Ancestor of a BST - Cpp Soultion
- Predecessor and Successor - Cpp Soultion
Day 21 (Binary Search Tree)
- Floor and Ceil from a BST
- Kth Smallest Element in a BST - Cpp Soultion
- Kth largest element in BST - Cpp Soultion
- Two Sum IV - Input is a BST - Cpp Soultion
- Binary Search Tree Iterator - Cpp Soultion
- Largest BST - Cpp Soultion
- Serialize and Deserialize Binary Tree - Cpp Soultion
Day 22 (Mixed Questions)
- Binary Tree to DLL - Cpp Soultion
- Find Median from Data Stream - Cpp Soultion
- Kth Largest Element in a Stream - Cpp Soultion
- Distinct Numbers in Window - Cpp Soultion
- Kth Largest Element in an Array - Cpp Soultion
- Flood Fill - Cpp Soultion
Day 23 (Graph)
- Clone Graph - Cpp Soultion
- DFS of Graph - Cpp Soultion
- BFS of graph - Cpp Soultion
- Detect cycle in an undirected graph - Cpp Soultion
- Detect cycle in a directed graph - Cpp Soultion
- Topological sort - Cpp Soultion
- Number of Islands - Cpp Soultion
- Is Graph Bipartite? - Cpp Soultion
###