← All roadmaps

DSA Mastery Path

Beginner to advanced data structures and algorithms, with the exact problems and free video courses that map to each topic.

Click a node to expand it — summary, free resources, and a checkbox to mark it complete. Progress is saved on this device only.

DSA Mastery Path

19 nodes · 0 marked complete

Big-O & complexity analysis

Measuring how runtime and memory scale with input size — the vocabulary every other topic on this path is described in. Compare O(n²) vs O(n) solutions on "Two Sum" and "Contains Duplicate" to make it concrete.

Arrays & strings

Contiguous data — the substrate of most interview problems. "Best Time to Buy and Sell Stock", "Product of Array Except Self", and "Valid Anagram" build the pattern-recognition muscle everything else depends on.

Hash maps & sets

O(1) average lookup by key, trading memory for speed. "Group Anagrams" and "Longest Consecutive Sequence" are the canonical problems that make the trade-off click.

Two pointers

Two indices moving through data to avoid nested loops. "Valid Palindrome", "Container With Most Water", and "3Sum" turn an O(n²) instinct into an O(n) solution.

Sliding window

A moving subrange that turns O(n²) substring problems into O(n). "Longest Substring Without Repeating Characters" and "Minimum Window Substring" are the two problems that unlock the pattern for every window variant after them.

Stacks & queues

LIFO/FIFO structures underpinning parsing, undo systems, and BFS. "Valid Parentheses", "Min Stack", and "Daily Temperatures" cover the core problem shapes.

Linked lists

Nodes chained by pointers — cheap insertion, expensive random access. "Reverse Linked List", "Merge Two Sorted Lists", and "Linked List Cycle" are the three problems every interview loop assumes you've internalized.

Recursion basics

A function calling itself on smaller subproblems — base case plus recursive case. The foundation that trees, backtracking, and dynamic programming all build on directly.

Trees & BSTs

Hierarchical nodes; a BST keeps sorted order for O(log n) operations. "Invert Binary Tree", "Validate Binary Search Tree", and "Binary Tree Level Order Traversal" combine pointer manipulation with recursion.

Heaps / priority queues

Always pop the min or max in O(log n) — the engine behind top-K and scheduling problems. "Kth Largest Element", "Merge k Sorted Lists", and "Find Median from Data Stream" cover the range.

Backtracking

Try a choice, recurse, undo — exhaustive search with pruning. "Subsets", "Combination Sum", and "N-Queens" are the standard progression from simple enumeration to constrained search.

Graphs: BFS/DFS

Networks of nodes and edges — BFS for shortest unweighted path, DFS for reachability and structure. "Number of Islands", "Clone Graph", and "Rotting Oranges" are the classic three.

Topological sort

Ordering tasks so every dependency comes first — DAGs only. "Course Schedule" and "Course Schedule II" are the direct application of this pattern.

Tries

A prefix tree storing data character-by-character — the structure behind autocomplete and dictionary problems. "Implement Trie" and "Word Search II" cover the core mechanics and a real application.

Intervals & greedy

Sort by start, then merge or scan — meetings, ranges, and bookings ("Merge Intervals", "Insert Interval"). Greedy takes the locally best choice, which works when a local optimum guarantees a global one ("Jump Game", "Gas Station").

1-D dynamic programming

Cache overlapping subproblem answers with a recursion-plus-memo table. "House Robber", "Coin Change", and "Longest Increasing Subsequence" are the entry points into the single most interview-weighted advanced topic.

Shortest paths & MST

Dijkstra (no negative edges) and Bellman-Ford (handles them) for weighted shortest paths; Union-Find for near-O(1) connectivity and cycle detection; Kruskal/Prim for the cheapest edge set connecting all nodes.

2-D DP, tries & string algorithms

DP over grids or two sequences (edit distance, LCS family), segment trees/Fenwick trees for O(log n) range queries, KMP/Rabin-Karp for linear-time pattern matching, and bit manipulation tricks. The competitive-programming-adjacent capstone tier — target ~150-200 curated problems total, not 500 random ones.

Node list (accessible fallback)
TierNodePrerequisites
0 Big-O & complexity analysis —
1 Arrays & strings Big-O & complexity analysis
2 Hash maps & sets Arrays & strings
2 Two pointers Arrays & strings
3 Sliding window Two pointers
3 Binary search Arrays & strings
3 Stacks & queues Arrays & strings
3 Linked lists Arrays & strings
3 Recursion basics Arrays & strings
4 Trees & BSTs Linked lists, Recursion basics
5 Heaps / priority queues Trees & BSTs
5 Backtracking Recursion basics, Trees & BSTs
5 Graphs: BFS/DFS Trees & BSTs
6 Topological sort Graphs: BFS/DFS
6 Tries Hash maps & sets
6 Intervals & greedy Sliding window
6 1-D dynamic programming Recursion basics, Sliding window
7 Shortest paths & MST Graphs: BFS/DFS, Heaps / priority queues
7 2-D DP, tries & string algorithms 1-D dynamic programming, Tries