Topic library
Learn data structures & algorithms
36 lessons across 7 modules, ordered as a learning path, each with explanations, pseudocode, real implementations, complexity analysis, and interactive checks. About 8 hours total.
Module 1 · Foundations
What data structures and algorithms are, how to reason about efficiency, and how recursion works.
- Beginner
What are Data Structures & Algorithms?
The big picture: what data structures and algorithms actually are, why they matter, and how to think about choosing them.
~12 minStart - Beginner
Big O Notation & Time Complexity
Measure how algorithms scale: Big O, common complexity classes, best/average/worst cases, and space complexity.
~18 minStart - Beginner
Recursion Basics
Functions that call themselves: base cases, recursive cases, the call stack, and when recursion beats iteration.
~15 minStart - Intermediate
Bit Manipulation
Think in binary: masks, shifts, and XOR tricks that turn some O(n) or O(n²) problems into one-liners.
~13 minStart
Module 2 · Arrays & Strings
Traversals, in-place edits, searching, and the two-pointer and sliding-window patterns.
- Beginner
Arrays: Traversal, Insertion & Deletion
The fundamental data structure: indexed access, traversal, and why inserting in the middle shifts everything.
~12 minStart - Beginner
Linear Search
The simplest search: check every element until you find the target. Where it shines, where it fails, and how it compares to binary search.
~8 minStart - Intermediate
Two-Pointer Technique
A single O(n) pass with two coordinated indices: converging pairs, fast/slow runs, and in-place array surgery.
~15 minStart - Intermediate
Sliding Window
Turn "recompute every subarray" into a single O(n) pass by maintaining a window that grows and shrinks.
~15 minStart - Intermediate
Prefix Sums
Precompute running totals once, then answer any range-sum query in O(1), the precomputation trade-off in its purest form.
~10 minStart - Intermediate
String Algorithms: Anagrams, Palindromes & Matching
The classic string toolkit: frequency counting, two-pointer palindrome checks, and naive pattern matching, the patterns behind most easy interview strings problems.
~14 minStart
Module 3 · Searching & Sorting
The classic searching and sorting algorithms, how they move data and when each is the right tool.
- Intermediate
Binary Search
Halve the search space every step: the classic O(log n) algorithm, its invariants, and its boundary traps.
~16 minStart - Beginner
Bubble Sort
The friendly introduction to sorting: swap adjacent out-of-order pairs until everything bubbles into place.
~10 minStart - Beginner
Selection Sort
Scan for the minimum, swap it into place, repeat. Minimal swaps, maximal comparisons, and a useful mental model.
~10 minStart - Beginner
Insertion Sort
Grow a sorted region one element at a time, like sorting cards in your hand. Excellent on small or nearly-sorted data.
~10 minStart - Intermediate
Merge Sort
Split, sort halves, merge, the reliable O(n log n) workhorse and your first divide-and-conquer algorithm.
~15 minStart - Advanced
Quick Sort
Partition around a pivot, recurse on the sides, the fastest general-purpose sort in practice, with real worst-case risks.
~16 minStart - Intermediate
Heap Sort
Build a max-heap, then extract the maximum n times, an in-place O(n log n) sort with no worst-case traps.
~12 minStart
Module 4 · Core Data Structures
Linked lists, stacks, queues, and hash tables, the workhorses of everyday programming.
- Beginner
Linked Lists
Chains of nodes with pointers: O(1) insertion when you know where, O(n) access, and the anti-array.
~14 minStart - Beginner
Stacks
Last-in, first-out: push, pop, peek. The structure behind undo, browser back, function calls, and expression parsing.
~10 minStart - Beginner
Queues
First-in, first-out: enqueue, dequeue, and fairness. Plus deques and the circular-buffer trick.
~10 minStart - Intermediate
Hash Tables & Sets
Average O(1) lookup: how hashing works, what collisions are, load factors, and when hash tables are the wrong tool.
~16 minStart
Module 5 · Trees & Heaps
Hierarchical data: binary trees, traversals, binary search trees, and priority queues.
- Intermediate
Binary Trees & Traversals
Hierarchical data: nodes, subtrees, depth, and the four canonical traversals (pre/in/post-order, level-order).
~16 minStart - Intermediate
Binary Search Trees
Order inside a tree: left < node < right. Search, insert, delete in O(log n), and what unbalanced trees do to that promise.
~15 minStart - Intermediate
Heaps & Priority Queues
The min-at-top structure that never fully sorts: peek in O(1), insert/extract in O(log n), and a hidden array representation.
~15 minStart - Intermediate
Tries (Prefix Trees)
The tree built out of words themselves: O(L) insert and search, and the only structure that answers prefix queries natively.
~12 minStart
Module 6 · Graphs
Modeling networks of things: representations, breadth-first search, and depth-first search.
- Intermediate
Graph Representations
The most general structure in CS: vertices, edges, directed/weighted variants, and adjacency list vs matrix.
~13 minStart - Intermediate
Breadth-First Search
Explore in rings, nearest first, the queue-driven traversal that finds shortest paths in unweighted graphs.
~16 minStart - Intermediate
Depth-First Search
Dive deep, backtrack, repeat, the stack-driven traversal behind cycle detection, component counting, and maze exploration.
~15 minStart - Advanced
Dijkstra's Algorithm
Shortest paths when edges have weights, BFS's disciplined cousin that always expands the closest unvisited node first.
~15 minStart - Advanced
Minimum Spanning Trees (Prim's & Kruskal's)
Connect every node with the least total wire: the cut property, Kruskal's sort-everything strategy, and Prim's grow-one-node strategy.
~14 minStart - Intermediate
Topological Sort
Order tasks that depend on each other: Kahn's queue algorithm, DFS post-order, and cycle detection on DAGs.
~12 minStart
Module 7 · Problem-Solving Patterns
Reusable strategies: greedy choices, backtracking, and dynamic programming.
- Intermediate
Greedy Algorithms
Take the best local choice and never look back, fast and elegant when you can PROVE it works.
~14 minStart - Advanced
Backtracking
DFS over decisions: try, recurse, undo. The systematic way to enumerate solutions, with pruning that tames the explosion.
~16 minStart - Advanced
Dynamic Programming
Remember subproblem answers and never recompute: memoization, tabulation, and the art of the recurrence.
~18 minStart - Advanced
Longest Common Subsequence (LCS)
The classic 2-D dynamic programming table: what the two texts share, computed cell by cell.
~15 minStart - Advanced
0/1 Knapsack
Where greedy fails and DP shines: pick items under a weight budget to maximize value, the template for a whole family of problems.
~15 minStart