SDE Sheet contains very handily crafted and picked top coding interview questions from different topics of Data Structures & Algorithms. These questions are one of the most asked coding interview questions in coding interviews of companies like Google, Amazon, Microsoft, Facebook, Swiggy, Flipkart, etc, and cover almost all of the concepts related to Data Structure & Algorithms.
Key Highlights:
- Cover all concepts in limited time that are needed for a DSA interview.
- In-depth video solutions covering brute, better, optimal solutions.
- Well structured articles/notes for quick revision.
- C++, Java, Python and JavaScript code.
- Company Tags associated with each program.
- Notes section to save your notes for quick revision.
- Used by over 2M+ people worldwide in the last 2 years.

- Software Engineer at Google .
- Offers from Facebook London and other startups.
- Previously worked with Amazon, Media.net .
- Followed by 1M+ people across YT, Linkedin and other socials.
- Candidate Master at Codeforces.
- 6* at Codechef.
If you still have doubts or questions, we’ve got you covered! Check out our FAQs section at the bottom of the page, where we address some common queries that might help clarify any concerns you have.
Note: Only start solving the problems, if you have prior knowledge of DSA, in case you are a beginner please switch to Strivers A2Z DSA Sheet.
Note: The Series doesn’t focus on any specific programming language. Instead, it emphasizes logic and uses pseudocode. The first two basic videos might use C++, but for Java tutorials, you can watch other YouTube videos. When tackling core problems of data structures and algorithms (DSA), the Series uses pseudocode that isn’t tied to any particular programming language. However, you can find code examples in your preferred language in the notes and articles provided.
Day 1: Arrays
Find both C++/Java codes of all problem in the articles in the first column.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Set Matrix Zeroes | Link 1 | ![]() |
Link 2 | |
Pascal’s Triangle | Link 1 | ![]() |
Link 2 | |
Next Permutation | Link 1 | ![]() |
Link 2 | |
Kadane’s Algorithm | Link 1 | ![]() |
Link 2 | |
Sort an array of 0’s 1’s 2’s | Link 1 | ![]() |
Link 2 | |
Stock buy and Sell | Link 1 | ![]() |
Link 2 |
Day 2: Arrays Part-II
Find both C++/Java codes of all problem in the articles in the first column.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Rotate Matrix | Link 1 | ![]() |
Link 2 | |
Merge Overlapping Subintervals | Link 1 | ![]() |
Link 2 | |
Merge two sorted Arrays without extra space | Link 1 | ![]() |
Link 2 | |
Find the duplicate in an array of N+1 integers. | Link 1 | YT | Link 2 | |
Repeat and Missing Number | Link 1 | ![]() |
Link 2 | |
Inversion of Array (Pre-req: Merge Sort) | Link 1 | Link 2 |
Day 3: Arrays Part-III
Find both C++/Java codes of all problem in the articles in the first column.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Search in a 2d Matrix | Link 1 | YT | Link 2 | |
Pow(X,n) | Link 1 | YT | Link 2 | |
Majority Element (>N/2 times) | Link 1 | ![]() |
Link 2 | |
Majority Element (>N/3 times) | Link 1 | ![]() |
Link 2 | |
Grid Unique Paths | Link 1 | YT | Link 2 | |
Reverse Pairs (Leetcode) | Link 1 | ![]() |
Link 2 |
Day 4: Arrays Part-IV
Find both C++/Java codes of all problem in the articles in the first column.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
2-Sum-Problem | Link 1 | ![]() |
Link 2 | |
4-sum-Problem | Link 1 | ![]() |
Link 2 | |
Longest Consecutive Sequence | Link 1 | ![]() |
Link 2 | |
Largest Subarray with K sum | Link 1 | ![]() |
Link 2 | |
Count number of subarrays with given Xor K | Link 1 | ![]() |
Link 2 | |
Longest Substring without repeat | Link 1 | YT | Link 2 |
Day 5: Linked List
Find both C++/Java codes of all problem in the articles in the first column.
Day 6: Linked List Part-II
Find both C++/Java codes of all problem in the articles in the first column.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Find intersection point of Y LinkedList | Link 1 | YT | Link 2 | |
Detect a cycle in Linked List | Link 1 | YT | Link 2 | |
Reverse a LinkedList in groups of size k. | Link 1 | YT | Link 2 | |
Check if a LinkedList is palindrome or not. | Link 1 | YT | Link 2 | |
Find the starting point of the Loop of LinkedList | Link 1 | YT | Link 2 | |
Flattening of a LinkedList | Link 1 | YT | Link 2 |
Day 7: Linked List and Arrays
Find both C++/Java codes of all problem in the articles in the first column.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Rotate a LinkedList | Link 1 | YT | Link 2 | |
Clone a Linked List with random and next pointer | Link 1 | YT | Link 2 | |
3 sum | Link 1 | YT | Link 2 | |
Trapping rainwater | Link 1 | YT | Link 2 | |
Remove Duplicate from Sorted array | Link 1 | YT | Link 2 | |
Max consecutive ones | Link 1 | YT | Link 2 |
Day 8: Greedy Algorithm
Find both C++/Java codes of all problem in the articles in the first column.
Day 9: Recursion
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of recursion.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Subset Sums | Link 1 | YT | Link 2 | |
Subset-II | Link 1 | YT | Link 2 | |
Combination sum-1 | Link 1 | YT | Link 2 | |
Combination sum-2 | Link 1 | YT | Link 2 | |
Palindrome Partitioning | Link 1 | YT | Link 2 | |
K-th permutation Sequence | Link 1 | YT | Link 2 |
Day 10: Recursion and Backtracking
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of recursion.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Print all permutations of a string/array | Link 1 | YT | Link 2 | |
N queens Problem | Link 1 | YT | Link 2 | |
Sudoku Solver | Link 1 | YT | Link 2 | |
M coloring Problem | Link 1 | YT | Link 2 | |
Rat in a Maze | Link 1 | YT | Link 2 | |
Word Break (print all ways) | Link 1 | YT | Link 2 |
Day 11: Binary Search
Find both C++/Java codes of all problem in the articles in the first column.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
The N-th root of an integer | Link 1 | YT | Link 2 | |
Matrix Median | Link 1 | YT | Link 2 | |
Find the element that appears once in a sorted array, and the rest element appears twice (Binary search) | Link 1 | YT | Link 2 | |
Search element in a sorted and rotated array/ find pivot where it is rotated | Link 1 | YT | Link 2 | |
Median of 2 sorted arrays | Link 1 | YT | Link 2 | |
K-th element of two sorted arrays | Link 1 | YT | Link 2 | |
Allocate Minimum Number of Pages | Link 1 | YT | Link 2 | |
Aggressive Cows | Link 1 | YT | Link 2 |
Day 12: Heaps
Find both C++/Java codes of all problem in the articles in the first column.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Max heap, Min Heap Implementation (Only for interviews) | Link 1 | NA | NA | |
Kth Largest Element | Link 1 | NA | Link 2 | |
Maximum Sum Combination | Link 1 | NA | Link 2 | |
Find Median from Data Stream | Link 1 | NA | Link 2 | |
Merge K sorted arrays | Link 1 | NA | Link 2 | |
K most frequent elements | Link 1 | NA | Link 2 |
Day 13: Stack and Queue
Find both C++/Java codes of all problem in the articles in the first column.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Implement Stack Using Arrays | Link 1 | YT | Link 2 | |
Implement Queue Using Arrays | Link 1 | YT | Link 2 | |
Implement Stack using Queue (using single queue) | Link 1 | YT | Link 2 | |
Implement Queue using Stack (0(1) amortized method) | Link 1 | YT | Link 2 | |
Check for balanced parentheses | Link 1 | YT | Link 2 | |
Next Greater Element | Link 1 | YT | Link 2 | |
Sort a Stack | Link 1 | YT | Link 2 |
Day 14: Stack and Queue Part-II
Find both C++/Java codes of all problem in the articles in the first column.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Next Smaller Element | Link 1 | YT | Link 2 | |
LRU cache (IMPORTANT) | Link 1 | YT | Link 2 | |
LFU Cache | Link 1 | YT | Link 2 | |
Largest rectangle in a histogram | Link 1 | YT1/YT2 | Link 2 | |
Sliding Window maximum | Link 1 | YT | Link 2 | |
Implement Min Stack | Link 1 | YT | Link 2 | |
Rotten Orange (Using BFS) | Link 1 | YT | Link 2 | |
Stock Span Problem | Link 1 | YT | Link 2 | |
Find the maximum of minimums of every window size | Link 1 | YT | Link 2 | |
The Celebrity Problem | Link 1 | YT | Link 2 |
Day 15: String
Find both C++/Java codes of all problem in the articles in the first column.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Reverse Words in a String | Link 1 | YT | Link 2 | |
Longest Palindrome in a string | Link 1 | YT | Link 2 | |
Roman Number to Integer and vice versa | Link 1 | YT | Link 2 | |
Implement ATOI/STRSTR | Link 1 | YT | Link 2 | |
Longest Common Prefix | Link 1 | YT | Link 2 | |
Rabin Karp | Link 1 | YT | Link 2 |
Day 16: String Part-II
Find both C++/Java codes of all problem in the articles in the first column.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Z-Function | Link 1 | YT | Link 2 | |
KMP algo / LPS(pi) array | Link 1 | YT | Link 2 | |
Minimum characters needed to be inserted in the beginning to make it palindromic | Link 1 | YT | Link 2 | |
Check for Anagrams | Link 1 | YT | Link 2 | |
Count and Say | Link 1 | YT | Link 2 | |
Compare version numbers | Link 1 | YT | Link 2 |
Day 17: Binary Tree
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of Binary Trees.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Inorder Traversal | Link 1 | YT1 / YT2 | Link 2 | |
Preorder Traversal | Link 1 | YT1 / YT2 | Link 2 | |
Postorder Traversal | Link 1 | YT1 / YT2 | Link 2 | |
Morris Inorder Traversal | Link 1 | YT | Link 2 | |
Morris Preorder Traversal | Link 1 | YT | Link 2 | |
LeftView Of Binary Tree | Link 1 | YT | Link 2 | |
Bottom View of Binary Tree | Link 1 | YT | Link 2 | |
Top View of Binary Tree | Link 1 | YT | Link 2 | |
Preorder inorder postorder in a single traversal | Link 1 | YT | Link 2 | |
Vertical order traversal | Link 1 | YT | Link 2 | |
Root to node path in a Binary Tree | Link 1 | YT | Link 2 | |
Max width of a Binary Tree | Link 1 | YT | Link 2 |
Day 18: Binary Tree part-II
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of Binary Trees.
Day 19: Binary Tree part-III
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of Binary Trees.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Maximum path sum | Link 1 | YT | Link 2 | |
Construct Binary Tree from inorder and preorder | Link 1 | YT | Link 2 | |
Construct Binary Tree from Inorder and Postorder | Link 1 | YT | Link 2 | |
Symmetric Binary Tree | Link 1 | YT | Link 2 | |
Flatten Binary Tree to LinkedList | Link 1 | YT | Link 2 | |
Check if Binary Tree is the mirror of itself or not | Link 1 | YT | Link 2 | |
Check for Children Sum Property | Link 1 | YT | Link 2 |
Day 20: Binary Search Tree
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of Binary Trees.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Populate Next Right pointers of Tree | Link 1 | YT | Link 2 | |
Search given Key in BST | Link 1 | YT | Link 2 | |
Construct BST from given keys | Link 1 | YT | Link 2 | |
Construct BST from preorder traversal | Link 1 | YT | Link 2 | |
Check is a BT is BST or not | Link 1 | YT | Link 2 | |
Find LCA of two nodes in BST | Link 1 | YT | Link 2 | |
Find the inorder predecessor/successor of a given Key in BST. | Link 1 | YT | Link 2 |
Day 21: Binary Search Tree Part-II
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of Binary Trees.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Floor in a BST | Link 1 | YT | Link 2 | |
Ceil in a BST | Link 1 | YT | Link 2 | |
Find K-th smallest element in BST | Link 1 | YT | Link 2 | |
Find K-th largest element in BST | Link 1 | YT | Link 2 | |
Find a pair with a given sum in BST | Link 1 | YT | Link 2 | |
BST iterator | Link 1 | YT | Link 2 | |
Size of the largest BST in a Binary Tree | Link 1 | YT | Link 2 | |
Serialize and deserialize Binary Tree | Link 1 | YT | Link 2 |
Day 22: Binary Trees[Miscellaneous]
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of Binary Trees.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Binary Tree to Double Linked List | Link 1 | YT | Link 2 | |
Find median in a stream of running integers. | Link 1 | YT | Link 2 | |
K-th largest element in a stream. | Link 1 | YT | Link 2 | |
Distinct numbers in Window. | Link 1 | YT | Link 2 | |
K-th largest element in an unsorted array. | Link 1 | YT | Link 2 | |
Flood-fill Algorithm | Link 1 | YT | Link 2 |
Day 23: Graph
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of Graphs.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Clone a graph (Not that easy as it looks) | Link 1 | YT | Link 2 | |
DFS | Link 1 | YT | Link 2 | |
BFS | Link 1 | YT | Link 2 | |
Detect A cycle in Undirected Graph using BFS | Link 1 | YT | Link 2 | |
Detect A cycle in Undirected Graph using DFS | Link 1 | YT | Link 2 | |
Detect A cycle in a Directed Graph using DFS | Link 1 | YT | Link 2 | |
Detect A cycle in a Directed Graph using BFS | Link 1 | YT | Link 2 | |
Topological Sort BFS | Link 1 | YT | Link 2 | |
Topological Sort DFS | Link 1 | YT | Link 2 | |
Number of islands(Do in Grid and Graph Both) | Link 1 | YT | Link 2 | |
Bipartite Check using BFS | Link 1 | YT | Link 2 | |
Bipartite Check using DFS | Link 1 | YT | Link 2 |
Day 24: Graph Part-II
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of Graphs.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Strongly Connected Component(using KosaRaju’s algo) | Link 1 | YT | Link 2 | |
Dijkstra’s Algorithm | Link 1 | YT | Link 2 | |
Bellman-Ford Algo | Link 1 | YT | Link 2 | |
Floyd Warshall Algorithm | Link 1 | YT | Link 2 | |
MST using Prim’s Algo | Link 1 | YT | Link 2 | |
MST using Kruskal’s Algo | Link 1 | YT | Link 2 |
Day 25: Dynamic Programming
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of DP.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Max Product Subarray | Link 1 | YT | Link 2 | |
Longest Increasing Subsequence | Link 1 | YT | Link 2 | |
Longest Common Subsequence | Link 1 | YT | Link 2 | |
0-1 Knapsack | Link 1 | YT | Link 2 | |
Edit Distance | Link 1 | YT | Link 2 | |
Maximum sum increasing subsequence | Link 1 | YT | Link 2 | |
Matrix Chain Multiplication | Link 1 | YT | Link 2 |
Day 26: Dynamic Programming Part-II
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of DP.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Minimum sum path in the matrix, (count paths and similar type do, also backtrack to find the Minimum path) | Link 1 | YT | Link 2 | |
Coin change | Link 1 | YT | Link 2 | |
Subset Sum | Link 1 | YT | Link 2 | |
Rod Cutting | Link 1 | YT | Link 2 | |
Egg Dropping | Link 1 | YT | Link 2 | |
Word Break | Link 1 | YT | Link 2 | |
Palindrome Partitioning (MCM Variation) | Link 1 | YT | Link 2 | |
Maximum profit in Job scheduling | Link 1 | YT | Link 2 |
Day 27: Trie
Find both C++/Java codes of all problem in the articles in the first column.
I will recommend you to do this playlist at first, so that you learn A-Z of Tries.
Problem | Practice Link 1 | Video Solution | Practice Link 2 | |
---|---|---|---|---|
Implement Trie (Prefix Tree) | Link 1 | YT | Link 2 | |
Implement Trie – 2 (Prefix Tree) | Link 1 | YT | Link 2 | |
Longest String with All Prefixes | Link 1 | YT | Link 2 | |
Number of Distinct Substrings in a String | Link 1 | YT | Link 2 | |
Power Set (this is very important) | Link 1 | YT | Link 2 | |
Maximum XOR of two numbers in an array | Link 1 | YT | Link 2 | |
Maximum XOR With an Element From Array | Link 1 | YT | Link 2 |
Day 28: Operating System
- Refer Sheet for revision.
- Revise OS notes that you would have made during your sem
- If not made notes, spend 2 or 3 days and make notes from Knowledge Gate.
Day 29: DBMS
- Refer Sheet for revision.
- Revise DBMS notes that you would have made during your sem
- If not made notes, spend 2 or 3 days and make notes from Knowledge Gate.
Day 30: Computer Networks
- Refer Sheet for revision.
- Revise CN notes that you would have made during your sem
- If not made notes, spend 2 or 3 days and make notes from Knowledge Gate.
Day 31: Project Overview
Make a note of how will your represent your projects, and prepare all questions related to tech which you have used in your projects. Prepare a note which you can say for 3-10 minutes when he asks you that say something about the project.
Hurrah!! You are ready for your placement after a month of hard work without a cheat day.
~Striver
Share the sheet with your friends, created with love for takeUforward fam!