SDE Sheet, pattern by pattern
180 must-do coding interview problems, grouped into 33 patterns across 17 topics, from two pointers and sliding window to graphs and dynamic programming. Every problem links to LeetCode or GeeksforGeeks.
- 180problems
- 17topics
- 33patterns
- 2easy
- 109medium
- 69hard
Want the complete roadmap? A2Z DSA Sheet: all 428 problems
Your progress
–
Solved
– / 180
- Easy– / 2
- Medium– / 109
- Hard– / 69
Saved in this browser
All 17 topics
180 problems
/
Linear Scan· 4
Two Pointers· 7
Binary Search· 6
Search on Answer· 5
Sliding Window· 6
- Longest Substring Without Repeating CharactersMediumLeetCodeGFG
- Maximum Points You Can Obtain from CardsMediumLeetCodeGFG
- Max Consecutive Ones IIIMediumLeetCodeGFG
- Longest Repeating Character ReplacementHardLeetCodeGFG
- Longest Substring with at Most K Distinct CharactersHardLeetCodeGFG
- Minimum Window SubstringHardLeetCodeGFG
Subsets & Combinations· 7
Fast & Slow Pointers· 7
- Find Middle of Linked ListEasyLeetCodeGFG
- Find the Intersection Point of Y LLMediumLeetCodeGFG
- Check If LL Is Palindrome or NotMediumLeetCodeGFG
- Detect a Loop in LLMediumLeetCodeGFG
- Remove Nth Node from the Back of the LLMediumLeetCodeGFG
- Find the Starting Point in LLMediumLeetCodeGFG
- Length of Loop in LLMediumGFG
Reversal & Rewiring· 9
- Reverse a LLMediumLeetCodeGFG
- Merge Two Sorted ListsMediumLeetCode
- Sort a Linked List of 0's 1's and 2'sMediumGFG
- Add Two Numbers in Linked ListMediumLeetCodeGFG
- Rotate a LLMediumLeetCodeGFG
- Sort LLMediumLeetCode
- Clone a LL with Random and Next PointerHardLeetCodeGFG
- Reverse LL in Group of Given Size KHardLeetCodeGFG
- Flattening of LLHardLeetCodeGFG
Monotonic Stack / Queue· 9
- Next Greater ElementMediumLeetCodeGFG
- Next Greater Element - 2MediumLeetCode
- Stock Span ProblemMediumLeetCodeGFG
- Sum of Subarray MinimumsMediumLeetCodeGFG
- Sum of Subarray RangesMediumLeetCodeGFG
- Remove K DigitsMediumLeetCodeGFG
- Sliding Window MaximumHardLeetCodeGFG
- Largest Rectangle in a HistogramHardLeetCodeGFG
- Maximum RectanglesHardLeetCodeGFG
BFS· 7
DFS / Tree DP· 8
- Print Root to Leaf Path in BTMediumLeetCodeGFG
- Diameter of Binary TreeMediumLeetCodeGFG
- LCA in BTHardLeetCodeGFG
- Boundary TraversalMediumLeetCodeGFG
- Construct a BT from Preorder and InorderMediumLeetCodeGFG
- Morris Inorder TraversalHardLeetCodeGFG
- Maximum Path SumHardLeetCodeGFG
- Serialize and De-Serialize BTHardLeetCodeGFG
Inorder Traversal· 10
- Insert a Given Node in BSTMediumLeetCodeGFG
- LCA in BSTMediumLeetCodeGFG
- Delete a Node in BSTMediumLeetCodeGFG
- Inorder Successor and Predecessor in BSTMediumLeetCodeGFG
- Kth Smallest and Largest Element in BSTMediumLeetCodeGFG
- Check If a Tree Is a BST or NotMediumLeetCodeGFG
- Construct a BST from a Preorder TraversalMediumLeetCodeGFG
- Two Sum in BSTMediumLeetCodeGFG
- Correct BST with Two Nodes SwappedHardLeetCodeGFG
- Largest BST in Binary TreeHardLeetCodeGFG
BFS / DFS· 8
- Flood Fill AlgorithmMediumLeetCodeGFG
- Number of IslandsMediumLeetCode
- Rotten OrangesMediumLeetCodeGFG
- Distance of Nearest Cell Having OneMediumLeetCodeGFG
- Surrounded RegionsMediumLeetCodeGFG
- Number of Distinct IslandsMediumLeetCodeGFG
- Detect a Cycle in an Undirected GraphMediumLeetCodeGFG
- Bipartite GraphMediumLeetCodeGFG
Ordering & Connectivity· 7
Shortest Path· 9
- Shortest Path in Undirected Graph with Unit WeightsMediumGFG
- Shortest Path in DAGMediumGFG
- Dijkstra's AlgorithmMediumGFG
- Path with Minimum EffortMediumLeetCodeGFG
- Cheapest Flight Within K StopsHardLeetCodeGFG
- Bellman Ford AlgorithmHardGFG
- Floyd Warshall AlgorithmHardGFG
- Word Ladder IHardLeetCodeGFG
- Word Ladder IIHardLeetCodeGFG