Skip to content
On this page

The DSA Roadmap: An Overview

Our Philosophy: Patterns Over Problems

Welcome to the SDE Prep Data Structures & Algorithms track. Our goal is to teach you the underlying patterns behind interview questions so you can solve entire classes of problems, rather than just memorizing individual solutions.

The tech interview landscape is vast. It’s impossible to memorize the solution to every potential question. Instead, we focus on the reusable techniques that solve dozens of different problems. By mastering a pattern like "Sliding Window," you gain the ability to solve any problem that fits that structure, even if you’ve never seen it before.

Interviewers rarely ask for textbook implementations. They test for true understanding by disguising a core pattern with a unique story or a slight variation. This is where rote memorization fails and pattern recognition shines. By learning the patterns and their common variants, you’ll be equipped to see past the disguise and adapt your solution to the specific problem at hand.

How to Use This Roadmap

This roadmap is designed to be flexible, whether you're building from scratch or just brushing up.

  • For Beginners: We recommend starting from the beginning with the Foundations and moving sequentially through the curriculum. This will build a strong, layered understanding of each concept.
  • For Experienced Folks: If you're already comfortable with the basics, feel free to use the Foundations as a quick refresher. After that, you can jump directly to the specific patterns where you feel the weakest.

The ultimate goal here isn't just to "finish" the material, but to master it. We encourage you to prioritize deep understanding over speed.

The Curriculum: A Step-by-Step Path

Two Pointers

Locked 8
  • Basics
  • Opposite Ends On Sorted Arrays Sum Area
  • Same Direction For Dedup Partition
  • Fast Slow Cycle Detection
  • Middle Of List
  • Expand From Center Palindromes
  • In Place Reversal Sublist Reversal
  • Summary

Hashing & Counting

Locked 6
  • Basics
  • Dedup
  • First Unique
  • Anagram Grouping Signature Or Count Key
  • Rolling Window Counts
  • Summary

Stack

Locked 9
  • Basics
  • Valid Parentheses
  • Min Stack
  • Next Greater Element
  • Daily Temperatures
  • Histogram Rectangle
  • Evaluate Rpn
  • Basic Calculator
  • Summary

Queue & Deque

Locked 5
  • Basics
  • Level Order Traversal
  • Sliding Window Maximum Monotonic Deque
  • 0 1 Bfs With Deque
  • Summary

Binary Search

Locked 8
  • Basics
  • First Last Occurrence
  • Lower Upper Bound
  • Rotated Arrays
  • Finding Peak
  • Search On Doubles
  • Search Space Of Time Capacity Min Feasible
  • Summary

Trees

Locked 8
  • Basics
  • Level Order With Queue
  • Inorder Preorder Postorder Iterative With Stack
  • Validate Bst
  • Bst Search Insert Delete
  • Lca Binary Tree Bst
  • Serialize Deserialize
  • Summary

Dynamic Programming

Locked 10
  • Basics
  • 1D DP (House Robber)
  • Coin Change
  • Decode Ways
  • Knapsack (0/1 vs Unbounded)
  • Grid Paths With Obstacles
  • Longest Common Subsequence
  • 2D DP (Edit Distance)
  • LIS (O(n log n) Patience Sorting)
  • Summary

Graph Traversal

Locked 7
  • Basics
  • Connected Components
  • Cycle Detection
  • Bipartite Check
  • Grid BFS (Shortest Path)
  • Word Ladder
  • Summary

Recursion & Backtracking

Locked 9
  • Basics
  • Subsets
  • Combinations
  • Permutations
  • Combination Sum
  • Word Search (Grid)
  • N-Queens
  • Sudoku Solver
  • Summary

Intervals

Locked 7
  • Basics
  • Merge Intervals
  • Insert Interval
  • Meeting Rooms I & II
  • Minimum Arrows To Burst Balloons
  • Employee Free Time
  • Summary

Matrices & Grids

Locked 7
  • Basics
  • Spiral Order
  • Rotate Matrix In Place
  • Flood Fill
  • Number Of Islands
  • Connected Components With 4 8 Directions
  • Shortest Path With Obstacles

Strings

Locked 7
  • Basics
  • Two Pointer Validation Alnum Ignore Cases
  • Expand Around Center Palindromes
  • Sliding Window Anagrams
  • Custom Sorting With Order Map
  • Trie For Prefix Problems
  • Summary

Greedy

Locked 7
  • Basics
  • Jump Game (Furthest Reach)
  • Gas Station
  • Interval Scheduling
  • Coin Change (Canonical Sets)
  • Huffman-like Merges
  • Summary

Union Find (DSU)

Locked 6
  • Basics
  • Count Components
  • Detect Cycles (Undirected)
  • Number of Islands with Unions
  • Kruskal MST
  • Summary

Topological Sort

Locked 5
  • Basics
  • Course Schedule (Existence & Order)
  • Detect Cycles
  • Kahn's Algorithm vs. DFS
  • Summary

Prefix Sum & Difference Array

Locked 6
  • Basics
  • Prefix Sums with Hash Map
  • 2D Prefix Sums
  • Difference Array (Range Add)
  • Parity / Prefix XOR
  • Summary

Bit Manipulation

Locked 7
  • Basics
  • Set, Clear, Test & Toggle
  • Single Number with XOR
  • Two Singles with Bit Partition
  • Counting Bits
  • Subset Iteration over Bitmasks
  • Summary

Trie

Locked 1
  • Basics

Cache Designs

Locked 3
  • LRU & LFU Cache
  • Min Stack & Max Stack
  • Queue Via Stacks & Stack Via Queues

The Structure of Each Pattern

To help you build a deep and practical understanding, every pattern in this course follows a consistent structure:

  • Basics: A foundational explanation of the pattern’s core idea, illustrated with a simple, easy-to-understand example.
  • Variations: Most patterns have common variations (e.g., "Fixed vs. Variable Size" for Sliding Window, or "Cycle Detection" for Two Pointers). We dedicate a page to each of these variations, explaining the specific nuance and how to spot it.
  • High-Yield Problems: A curated set of problems designed to solidify your understanding and build confidence.
  • Trade-offs & Pitfalls: We cover common mistakes candidates make and what interviewers are really listening for when you discuss different approaches.

Next Steps

Try Our Free Sample Patterns

We've unlocked two complete patterns for you to explore:

These patterns alone will prepare you for dozens of common interview questions.

Unlock the Full Curriculum

Ready to master all 21 patterns and ace your technical interviews? Get instant access to the complete DSA curriculum.

See Pricing