Skip to content
Free course · 162 lessons

Data Structures & Algorithms

Patterns first, then the problems they unlock.

A practice-driven route through data structures and algorithms. Each lesson teaches a structure or pattern, then works through classic problems with solutions in Python, Java, C++ and Go.

Learning path

5 stages, one step at a time

Each stage builds on the one before it. Go in order the first time, then jump around when you need a refresher.

  1. 01

    Foundations

    Complexity, recursion and the core linear structures.

    23 lessons · 5.1 hrsJump to stage →
  2. 02

    Core patterns

    The techniques that turn slow solutions into fast ones.

    17 lessons · 4.2 hrsJump to stage →
  3. 03

    Trees, graphs and search

    Hierarchies, networks and exhaustive search.

    31 lessons · 8 hrsJump to stage →
  4. 04

    Advanced techniques

    Optimization strategies and specialist toolkits.

    37 lessons · 9.3 hrsJump to stage →
  5. 05

    Interview ready

    Putting it together under time pressure, plus pattern guides and deep dives.

    54 lessons · 9 hrsJump to stage →
Curriculum

17 parts · 162 lessons

Open a part to see its lessons. Completed lessons are ticked off as you go.

Stage 1 Foundations

00FoundationsBig-O, recursion, bits, interview math and language idioms.7 lessons1.2 hrs7
  1. 01How to use this handbookHow to read this handbook: who it's for, what to skip, how to pick a language, and the four questions every DSA resource ducks.8m✓
  2. 02Computational complexity and Big-OComputational complexity, Big-O, and the asymptotic vocabulary every algorithm chapter assumes you have. The five Bachmann-Landau notations.12m✓
  3. 03The recursion mental modelThe mental model for recursion: base case, recursive case, and how to read tree-shaped recursion without losing your place.14m✓
  4. 04Bit manipulation primerBit manipulation primer: AND, OR, XOR, NOT, shifts, popcount. The bit-level idioms that show up in interview problems.9m✓
  5. 05Math for interviewsThe math you actually need for technical interviews: modular arithmetic, GCD, primality, combinatorics, integer overflow.13m✓
  6. 06Language idioms across Python, Java, C++, GoIdiomatic patterns for Python, Java, C++, and Go: collections, iteration, sorting, comparators. The dialect each language wants you to write.7m✓
  7. 07Choosing your interview languageHow to pick a language for technical interviews: trade-offs, what each language costs you in problem-solving time, and a decision tree.9m✓
01Linear Data StructuresArrays, strings, hash maps, stacks, queues and matrices.8 lessons1.8 hrs341
  1. 01Arrays: static, dynamic, multi-dimensionalArrays: contiguous memory, O(1) indexing, and the operations that differ between fixed-size arrays and dynamic arrays.11m✓
  2. 02Dynamic array internalsHow dynamic arrays grow: amortised O(1) append, the doubling trick, capacity vs length, and what each language calls them.13m✓
  3. 03Strings: encoding, immutability, buildersStrings as character arrays and beyond: immutability, encoding, concatenation cost, and the per-language trade-offs that catch interviews out.11m✓
  4. 04Hash maps and hash setsHash maps from first principles: hash functions, buckets, average vs worst-case complexity, and the standard library implementations.16m✓
  5. 05Hash collisions and the load factorHash collisions: separate chaining, open addressing, load factor, rehashing, and why hash maps degrade to O(n) under adversarial keys.16m✓
  6. 06Stacks and the call stack analogyStacks as data structures and algorithmic primitives: LIFO, function-call stacks, and the interview problems that scream 'stack'.14m✓
  7. 07Queues, deques, and circular buffersQueues and deques: FIFO, double-ended, ring buffers, and the BFS / sliding-window problems where the right primitive is a deque.14m✓
  8. 08Matrix manipulation2D arrays and matrix manipulation: in-place rotation, transposition, spiral traversal, and indexing without off-by-one bugs.14m✓
02Search & SortBinary search and its variants, sorting algorithms and selection.8 lessons2.1 hrs17
  1. 01Linear search and what it's good forLinear search: when O(n) is the right answer, and the problems where the trick is recognising you don't need anything cleverer.9m✓
  2. 02Binary search: the canonical versionBinary search done right: the canonical template, off-by-one pitfalls, and the invariant you need to articulate before writing the loop.18m✓
  3. 03Binary search variants: lower_bound, upper_bound, peaks, and rotated arraysBinary search beyond sorted arrays: lower_bound, upper_bound, first-true, last-true, and binary search on the answer space.20m✓
  4. 04Comparison sorts I: insertion sort and merge sortInsertion, selection, and bubble sort: O(n^2) sorts, when each wins on real input, and the constant-factor lessons that hide inside them.14m✓
  5. 05Comparison sorts II: quicksort, partition, and the production hybridsMerge sort and quicksort: divide-and-conquer, partitioning, stability, and why production library sorts are hybrid algorithms.18m✓
  6. 06Heap sort and the n log n lower boundHeap sort and the binary heap: heapify, sift-up, sift-down, and why a heap is the right tool for k-way merges and priority queues.17m✓
  7. 07Linear-time sorts: counting, radix, bucketCounting sort, radix sort, bucket sort: O(n) sorts that beat the comparison-sort lower bound when the input has structure.16m✓
  8. 08Quickselect: linear-time selectionQuickselect: O(n) average kth-smallest, partitioning, and the problems where you can dodge a full sort by selecting only the part you need.15m✓

Stage 2 Core patterns

03Two Pointers, Sliding Window & Prefix SumsTwo pointers, sliding windows and prefix sums.6 lessons1.4 hrs24
  1. 01Two pointers: opposite endsTwo pointers, opposite ends: the inward sweep, sorted-array invariants, and the canonical 'sum to target' / 'pair under constraint' patterns.15m✓
  2. 02Two pointers: same directionTwo pointers, same direction: fast-slow pointers, in-place filtering, and the array problems that disguise this pattern.11m✓
  3. 03Sliding window: fixed sizeFixed-size sliding windows: maintaining a running aggregate in O(1) per step, and the problems whose constraint is window length.13m✓
  4. 04Sliding window: variable sizeVariable-size sliding windows: shrinking when the invariant breaks, and the longest-substring / minimum-window problem family.16m✓
  5. 05Prefix sums and difference arraysPrefix sums: O(1) range-sum queries, 2D extensions, and the subarray-sum problems that simplify once the right precomputation is in place.16m✓
  6. 06The prefix-sum + hash-map comboPrefix sum + hash map: counting subarrays with a target sum, the canonical 'subarray sum equals K' problem family, and modulo extensions.16m✓
04Stack & Queue PatternsMonotonic stacks and deques, parsing and amortized tricks.5 lessons1.2 hrs5
  1. 01Monotonic stackPush indices, pop while the incoming value violates a monotone order. The data structure designed for the intersection of nearest-greater queries and one-pass linear scans.15m✓
  2. 02Monotonic dequePop from both ends to maintain a windowed running max or min in O(1) amortized per slide. The structure that makes sliding-window-extremum problems linear instead of n log k.13m✓
  3. 03Min and max stacksAugment a stack with an O(1) aggregate query by pinning a parallel auxiliary stack to it; scale the technique from running min to lazy bulk-update to frequency tracking.16m✓
  4. 04Expression evaluation and parsingStacks suspend operators until their right operand exists. The shunting-yard rhythm and the LeetCode 224/227/772 family where the order characters arrive in is not the order arithmetic should happen.16m✓
  5. 05Queue from stacksImplement a queue using only stack primitives. The two-stack lazy-transfer trick, amortized O(1) on every operation, and why the LIFO-from-FIFO inverse has no symmetric construction.14m✓
05Linked ListsPointer manipulation, fast/slow pointers and in-place reversal.6 lessons1.5 hrs15
  1. 01Linked list fundamentals: sentinels, pointer rewiring, doubly-linked designSentinel and dummy nodes erase the boundary branching that special-cases head and tail. The pointer-rewiring discipline and the doubly-linked design every later chapter in Part 5 assumes.19m✓
  2. 02Reversal patternsReverse a singly-linked list in place with prev, curr, next. The snapshot-then-clobber rule, plus the iterative and recursive forms that show up as a primitive in every later linked-list chapter.14m✓
  3. 03Reverse in groups of kThree mechanical phases stacked on single-list reversal solve LeetCode 25 in O(1) extra memory, with the seam between groups handled cleanly.12m✓
  4. 04Cycle detection (Floyd's tortoise and hare)Two pointers, one stepping twice as fast as the other, locate a cycle's entry node in O(n) time and O(1) space. The modular-arithmetic three-line proof of why the second-phase reset works.14m✓
  5. 05Merging linked listsMerge sorted linked lists in place. The dummy-head trick that erases the first-node special case, two-list and k-list versions, and the heap-based and divide-and-conquer extensions to LC 23.16m✓
  6. 06LRU cache: hash map plus doubly linked listBuild the data structure behind LeetCode 146 from a doubly-linked list and a hash map. O(1) get and put with explicit list management, no shortcut through Python's OrderedDict.17m✓

Stage 3 Trees, graphs and search

06Trees & HeapsTraversals, BSTs, heaps, tries and segment trees.11 lessons2.9 hrs173
  1. 01Binary tree fundamentalsTree terminology, height vs depth, the two physical representations, and the on-disk vocabulary every later Part 6 chapter assumes you have pinned down.14m✓
  2. 02Tree traversals: pre, in, postOne recursive skeleton has three positions for the visit() call. The pre, in, and post placements solve different problem families on the same scaffolding.16m✓
  3. 03Morris traversal: O(1)-space inorder by threadingWalk a binary tree in inorder with no recursion stack and no auxiliary memory by threading temporary right-pointers from each subtree's rightmost descendant back to its successor.16m✓
  4. 04Level-order traversal: BFS on treesBFS on trees, with the level_size = len(queue) snapshot that turns 'visit every node' into 'visit every node grouped by depth' with the boundaries preserved.12m✓
  5. 05Heaps and priority queuesSift-up and sift-down, Floyd's O(n) bottom-up build vs O(n log n) repeated insert, and the language-by-language API for the priority-queue primitive.27m✓
  6. 06Binary search treesThe BST invariant, search/insert/delete operations, and why every shipping standard library uses a balanced variant instead of a plain BST.15m✓
  7. 07AVL trees and rotationsSelf-balancing BSTs from first principles: the AVL invariant, the four rotation cases, the 1.44 log(n+2) height bound, and why every production ordered map descends from this 1962 paper.14m✓
  8. 08Red-black trees: an overviewThe balancing scheme behind TreeMap, std::map, and the Linux scheduler. Five invariants, the rotation cases at a high level, and what an interview can reasonably ask about them.9m✓
  9. 09TriesChildren-map-plus-end-flag nodes give prefix walks in O(L) on query length. The autocomplete and IP-routing problem family where prefix structure is the whole point.18m✓
  10. 10Tree DP primer: post-order with side statePost-order helpers thread side state down through arguments, return aggregates up the call stack, and use a global to track diameter-style through-this-node optima.17m✓
  11. 11Segment treesO(log n) point updates and O(log n) range queries on the same array. The recursive build and the lazy-propagation extension for range updates.16m✓
07Recursion & BacktrackingSubsets, permutations, combinations and pruning.7 lessons1.9 hrs43
  1. 01Recursion patterns: linear, tree, and divide-and-conquerThree call-tree shapes (linear, tree, divide-and-conquer) and how to read the shape from the recursive case so you know whether you need memoization, an accumulator, or neither.16m✓
  2. 02The backtracking templateChoose, recurse, unchoose, with prune-on-partial-information as the move that turns exponential search into something that finishes.16m✓
  3. 03Subsets, combinations, permutationsOne recursion with three knobs (when to snapshot the path, what to skip, when to allow repeats) covers subsets (LC 78), permutations (LC 46), and combination sum (LC 39).17m✓
  4. 04N-Queens: pruning and constraint propagationColumn and diagonal occupancy bitsets give O(1) attack checks. Symmetry pruning and the constraint-propagation idea that generalizes to Sudoku and beyond.17m✓
  5. 05Sudoku solver: constraint propagation and forward checkingRow, column, and box bitmasks combined with MRV cell selection and a forward-checking loop solve a 9x9 in milliseconds, despite 4 × 10^38 candidate fillings.15m✓
  6. 06Word search and grid backtrackingGrid DFS with mark-and-restore: the in-place visited trick that turns a 2D backtracking problem into one clean recursion.15m✓
  7. 07Randomized algorithms: Fisher-Yates, reservoir sampling, rejection samplingThree randomized recipes (Fisher-Yates shuffle, reservoir sampling, rejection sampling) whose proofs of uniform correctness are the actual lesson, not the code.18m✓
08GraphsBFS, DFS, shortest paths, topological sort and union-find.13 lessons3.2 hrs184
  1. 01Graph representationThree ways to store a graph (adjacency list, adjacency matrix, edge list), the memory math that decides between them, and the default every interview assumes.13m✓
  2. 02Breadth-first searchQueue, visited set, and the discipline of never enqueuing the same vertex twice. The shortest-path-on-unweighted-edges algorithm, plus its multi-source and grid variants.14m✓
  3. 03Depth-first searchFive lines that visit on entry and recurse on neighbors, plus the customization knobs (entry hook, exit hook, edge classification) every advanced graph algorithm later in Part 8 turns.12m✓
  4. 04Connected components and flood fillCounting and measuring components in a graph or grid: the outer scan that turns plain BFS or DFS into the algorithm.17m✓
  5. 05Topological sort: Kahn's algorithmIndegree-driven, queue-based, iterative. Kahn's algorithm flags a cycle by failing to consume every vertex.11m✓
  6. 06Topological sort: DFS post-order reverseDFS-based topological sort: three-color recursion, post-order emission, and the algorithms that fall out of the same skeleton, Tarjan's bridges, Hierholzer's Eulerian path, cycle-length detection.16m✓
  7. 07Cycle detection in graphsThree-state DFS coloring for directed cycles, parent-aware single-state DFS for undirected, and the bug both halves share when the wrong one is used.15m✓
  8. 08Bipartite checkTwo-color a graph by BFS or DFS. The odd-cycle obstruction, the linear-time check, and the problem family that disguises this question as 'split into two groups'.11m✓
  9. 09Union-Find: parent forests, path compression, and union by rankParent forests, union by rank, path compression, and the inverse-Ackermann amortized bound. The cycle-detection and connected-components problem family it owns.23m✓
  10. 10Dijkstra's shortest-path algorithmSingle-source shortest paths on weighted graphs with non-negative edges: the priority-queue mechanics, the lazy-deletion idiom, and the min-max-path and 0-1 BFS specializations.16m✓
  11. 11Bellman-Ford and negative cyclesV-1 edge relaxations on every edge, an extra Vth pass to detect negative cycles, and the algorithm that handles the negative-edge case Dijkstra silently mis-reports.15m✓
  12. 12Minimum spanning tree: Kruskal's algorithmKruskal's algorithm: sort edges by weight, accept each one whose endpoints sit in different components, halt at n-1 edges. The cycle check is union-find; the cost is the sort.14m✓
  13. 13Minimum spanning trees: Prim's algorithmPrim's algorithm grows a minimum spanning tree from a single start vertex by absorbing the cheapest crossing edge. Same MST as Kruskal, different path; better choice on dense and implicit graphs.14m✓

Stage 4 Advanced techniques

09Dynamic ProgrammingFrom memoization to interval, tree and bitmask DP.15 lessons4.1 hrs114
  1. 01Dynamic Programming: From Recursion to MemoizationWhen a recursion's call tree carries redundancy, an eight-character cache drops Fibonacci from O(phi^n) to O(n). The systematic move from naive recursion to memoized recursion to bottom-up tabulation.14m✓
  2. 02DP: bottom-up tabulationConvert memoized recursion to an iterative table fill: dependency DAG, topological order, loop, array. Plus the rolling-pair O(1) compression.14m✓
  3. 03Dynamic programming on a 1D state1D-state DP: when the answer at index i depends on a small fixed window of earlier indices. Climbing stairs, house robber, min cost climbing stairs, and the rolling-scalars space collapse.12m✓
  4. 04Decode Ways and Word Break: string-prefix decision DPTwo string-prefix decision DPs whose recurrences look different but run on the same dp[i] = OR-over-valid-splits skeleton. LC 91 Decode Ways and LC 139 Word Break.16m✓
  5. 050/1 knapsack0/1 knapsack: take-or-skip per item, the 1D table fill, why the inner loop sweeps right-to-left, and the family of subset-sum reformulations (LC 416, 494, 474, 879, 1049).14m✓
  6. 06Unbounded knapsack: when items can be picked over and overOne inner-loop direction reversed from 0/1 knapsack unlocks the coin-change family. How 'minimum coins', 'count of ways', and 'minimum cost' all fit one recurrence.17m✓
  7. 07Longest common subsequenceThe O(n*m) 2D DP for longest common subsequence, parent-pointer recovery for the actual subsequence, and the edit-distance and shortest-common-supersequence variants that live on the same table.26m✓
  8. 08Edit distanceWagner-Fischer's three-way recurrence for the minimum number of insertions, deletions, and replacements that turn one string into another. The canonical 2D string DP.14m✓
  9. 09Longest Increasing Subsequence: the quadratic DPPer-index dp[i] = max-over-smaller-predecessors gives the O(n^2) LIS. Parent-pointer recovery and the variants (LIS count, LIS with k-tolerance) that stay quadratic.13m✓
  10. 10LIS: patience sortFrom 9.8's O(n^2) DP to O(n log n): the patience-sort framing, the tails-array invariant, binary search by tail value, and the LC 354 sort-then-LIS reduction.16m✓
  11. 11Palindrome DPFilling a 2D table whose recurrence reads dp[i+1][j-1] forces a diagonal fill order. The longest-palindromic-substring and min-cuts family that lives on it.18m✓
  12. 12Interval DP: matrix chain and burst balloonsState is dp[l][r], and the recurrence picks the LAST operation in the range. Burst Balloons (LC 312) and Matrix Chain Multiplication (LC 1039) are the canonical specimens.15m✓
  13. 13Grid DP: forward fills, backward survivesTop-down forward fills (Unique Paths, Min Path Sum) and bottom-up backward survives (Dungeon Game). The direction is picked by whether the constraint applies at start or finish.19m✓
  14. 14Tree DP: states that travel up the call stackPost-order helpers that return more than one number to the parent ((rob, skip), (diameter, depth)) centered on LC 337 House Robber III and LC 124 Max Path Sum.21m✓
  15. 15Bitmask DPA subset of a small ground set encoded as one integer, dp[mask] = ..., and the assignment / TSP / shortest-path-visiting-all family where this state is the only one that fits.15m✓
10GreedyWhen the locally best choice is globally best.5 lessons1.2 hrs5
  1. 01Greedy thinking: when local choices win, and when they don'tWhen the locally-best choice provably aggregates to the globally-best answer. The exchange-argument proof technique and the failure modes where greedy looks right and isn't.13m✓
  2. 02Interval scheduling: the comparator is the algorithmSort by end time and you've picked the maximum non-overlapping subset. The comparator (not the DP, not the heap) is the entire algorithm.12m✓
  3. 03Activity selection and the task-scheduler familyA max-heap of remaining tasks paired with a cooldown queue. The same skeleton solves LC 621 Task Scheduler, room booking, and conference assignment.13m✓
  4. 04Huffman encodingBuild the optimal prefix-free code bottom-up by repeatedly merging the two least-frequent symbols. The optimality proof and why this construction wins where top-down construction fails.17m✓
  5. 05Jump games and gas stationTwo array problems that look O(n^2), both solved by a single linear pass that maintains one running quantity. LC 55 Jump Game and LC 134 Gas Station.18m✓
11Bit ManipulationBit tricks, masks and XOR patterns.4 lessons47 min31
  1. 01Bit operations cookbookThe two identities the rest of Part 11 stands on: x & -x for the lowest set bit, x & (x-1) to clear it. Plus popcount, set/clear/flip/test, and subset iteration.12m✓
  2. 02XOR patternsXOR patterns: pair-cancellation as a bit-vector group law, and the family of LC problems it solves in O(n) time and O(1) space.12m✓
  3. 03Bitmask techniquesEncode a small set as an integer; iterate every subset; walk the submasks of a mask. The substrate behind bitmask DP.11m✓
  4. 04Bit tricks for performanceA toolkit of bit-pattern identities (Brian Kernighan's loop, x & -x, SWAR popcount, de Bruijn bit-scan) and the hardware intrinsics that have made most of them obsolete in production.12m✓
12Strings & Pattern MatchingKMP, Rabin-Karp, tries and suffix structures.6 lessons1.5 hrs24
  1. 01Naive string matchingThe O(nm) double loop hidden inside str.find and str.indexOf. Average-case behavior on real text, and the adversarial inputs that motivate KMP and Rabin-Karp.10m✓
  2. 02Rabin-Karp and rolling hashesRolling hashes give O(1)-per-slide hash maintenance for fixed-length windows. Double hashing defeats adversarial collisions and unlocks the duplicate-substring problem family.17m✓
  3. 03KMP and the failure functionKnuth-Morris-Pratt: deterministic O(n+m) substring search via the failure function, and the prefix-suffix table that solves a small family of problems on its own.16m✓
  4. 04Z-algorithmZ-array as the prefix-match table on a string; the [l, r) window invariant that makes it linear; how it compares with KMP for exact pattern matching.16m✓
  5. 05Aho-Corasick: many patterns, one passA trie with failure links: how Aho-Corasick scans a text once and reports every occurrence of every pattern in a fixed dictionary in O(n + m + z) time.18m✓
  6. 06Suffix arrays: a sorted index of every suffixA sorted index of every suffix in roughly 4n bytes, plus the LCP array. The substring-search, longest-repeated-substring, and BWT applications built on these two arrays.15m✓
13Design the Data StructureLRU caches, iterators and custom structures.7 lessons1.7 hrs43
  1. 01LRU cache: design framing, concurrency, and multi-tier deploymentPointer rewiring is the warm-up for LeetCode 146. Thread-safety, multi-tier deployment, and Caffeine-style admission policies are the actual interview.18m✓
  2. 02LFU cache: hash map plus frequency-bucketed doubly linked listsA hash map keyed by frequency, each value a doubly-linked list of equally-frequent entries, plus a min-frequency tracker. The construction that earns LeetCode 460 its Hard rating.17m✓
  3. 03Min stack and max-frequency stackTwo design problems, one technique. Pin a parallel auxiliary to a stack and the augmented operation collapses to a peek; the auxiliary's shape tracks the contract.11m✓
  4. 04Hit counter and rate limiterFixed-window, sliding-window-log, and token-bucket variants of LC 362 Design Hit Counter, with the precision-and-memory trade-offs that production systems (Cloudflare, Stripe, AWS) pick from.17m✓
  5. 05Trie autocompletePer-node ranked top-k cache, persistent suggestions across keystrokes, and the design moves that take a vanilla trie from O(L + answers) to single-digit-microsecond typeahead.14m✓
  6. 06Twitter feed designLC 355 Design Twitter as a mechanics-driven design class: monotonic timestamps, per-user append-only logs, and a k-way merge through a heap of author cursors for the news feed.14m✓
  7. 07Game state designStore the answer the board would give, not the board itself. Per-row, per-column, per-diagonal counters give LC 348 Tic-Tac-Toe O(1) per move and O(n) memory total.13m✓

Stage 5 Interview ready

14Interview FrameworkHow to approach, communicate and test in a coding round.12 lessons1.5 hrs12
  1. 01Pattern recognition: the fastest skill to developThe twenty patterns that cover ~95% of new-grad FAANG coding rounds, the top five that cover half on their own, and the recognition rhythm that names the pattern in the first 90 seconds.8m✓
  2. 02The first five minutes: clarifying questionsWhat to ask in the first five minutes. The questions interviewers grade you on, the prompts that signal seniority, and the failure mode that costs the most candidates the round.7m✓
  3. 03Communicating during the interviewThinking aloud, narrating trade-offs, and the interviewing.io data showing the 4-4-2 candidate beats the 3-3-4 candidate on outcomes.6m✓
  4. 04Complexity discussionsHow to answer 'what's the time complexity?' in one sentence: derive vs memorize, time alongside space, the right qualifier (worst/average/amortized), all four signals at once.8m✓
  5. 05The mock interview processWhen to start mocking, which platform to use, how many mocks you actually need, and how to run a debrief that converts a session into signal.9m✓
  6. 06Common pitfallsThe five highest-leverage failure modes at FAANG-tier loops: jumping to code, silent solving, missed clarifications, unstructured complexity answers, and the signal failures that look like skill failures.8m✓
  7. 07Amazon Leadership Principles, brieflyWhich Leadership Principles surface most in coding rounds, why the chat at minute 5 and minute 50 is part of the rubric, and the rounds where 'I'll just be excellent at the algorithm' fails.8m✓
  8. 08Amazon Leadership Principles narrationSTAR-format micro-narrations for the technical rounds, plus the eight to twelve full stories the behavioral and Bar Raiser rounds expect candidates to walk in carrying.7m✓
  9. 09Meta's AI round: the formatWhat Meta's AI-assisted coding round actually is in 2026: 60 minutes, three phases, a model menu, and a rubric that grades how you use the AI more than what the AI produces.7m✓
  10. 10Meta's AI round: prompting tacticsPrompting tactics for an AI-assisted coding round. The three-tier hierarchy (orchestrator, spot-checker, typist) that produces the behavior the rubric scores.8m✓
  11. 11Meta's AI round: common failuresCandidates who treat the assistant as a solver, candidates who can't explain their own code, and the system-prompt hardening that breaks any prep built on 'AI will catch the bug'.9m✓
  12. 12Per-company tracks: index and how to useWhen to open a per-company track, how to layer it on Parts 0-13, and the three signals that tell you it's time to move from pattern practice to company-specific calibration.4m✓
✦Pattern Decision GuidesDecision guides comparing approaches that solve similar problems.37 lessons6.7 hrs2278
  1. 01Recursion vs iteration: when does iteration matter11m✓
  2. 02Memoization vs tabulation, top-down vs bottom-up11m✓
  3. 03Hash map vs sorted map: O(1) average vs O(log n) ordered10m✓
  4. 04Array vs linked list: when each wins11m✓
  5. 05Stack vs queue vs deque, picking the right LIFO/FIFO10m✓
  6. 06Heap vs sorted array vs balanced BST vs language-sorted-set11m✓
  7. 07Two-heap median archetypes: when one heap is not enough10m✓
  8. 08K-way merge and cursor heap11m✓
  9. 09BFS vs DFS for graphs: when each is correct10m✓
  10. 10Dijkstra vs Bellman-Ford vs 0-1 BFS vs A*, shortest-paths decision tree11m✓
  11. 11Kruskal vs Prim, MST decision11m✓
  12. 12Quicksort vs mergesort vs heapsort, picking your sort10m✓
  13. 13Binary search vs linear scan, and binary search on the answer9m✓
  14. 14Two pointers vs sliding window: the lookalikes11m✓
  15. 15Iterative vs Morris vs recursive tree traversal12m✓
  16. 16Trie vs hash map vs sorted set: the prefix-query decision11m✓
  17. 17Union-Find vs DFS for connectivity10m✓
  18. 18Topological sort: Kahn vs DFS-based12m✓
  19. 19Greedy vs DP: when greedy is provably correct10m✓
  20. 20Backtracking vs DP: overlapping subproblems vs not11m✓
  21. 21Recursion vs DP: when there is no overlap (tree traversal) vs when there is10m✓
  22. 22When to reach for bit manipulation13m✓
  23. 23BFS vs DFS for trees: level-order vs in/pre/post-order semantics11m✓
  24. 24Quickselect vs heap for top-K9m✓
  25. 25Sliding window archetypes11m✓
  26. 26Two-pointer archetypes: opposite-ends, fast-slow, partition, in-place dedup, merge-from-end10m✓
  27. 27Prefix-sum archetypes (incl. prefix-sum + hash, prefix XOR, difference array, 2D)11m✓
  28. 28Monotonic stack archetypes11m✓
  29. 29Monotonic deque archetypes9m✓
  30. 30In-place reversal of a linked list group11m✓
  31. 31Cyclic sort archetypes: missing, duplicate, and first-positive in a [1..n] permutation-shaped array11m✓
  32. 32Top-K via heap or quickselect12m✓
  33. 33Merge intervals archetypes10m✓
  34. 34Tree DP archetypes11m✓
  35. 35Bitmask DP archetypes13m✓
  36. 36Backtracking template + pruning14m✓
  37. 37Sweep line archetypes10m✓
✦EditorialsLong-form walkthroughs of classic problems with several approaches.5 lessons49 min14
  1. 01Two Sum9m✓
  2. 02Longest Substring Without Repeating Characters10m✓
  3. 03Longest Palindromic Substring10m✓
  4. 04Container With Most Water10m✓
  5. 053Sum10m✓

BeginnerIntermediateAdvanced

How to get the most out of it

Read, explain, revisit

01

Read in order first

Lessons list their prerequisites at the top. The stages are ordered so you rarely meet a term before it's explained.

02

Write it in your own words

Summarizing the idea and its trade-offs is the quickest way to find what you haven't understood yet.

03

Come back to the diagrams

When revising, skim the diagrams and tables before re-reading. If you can explain each one, you know the lesson.

The lessons in this course are adapted from the Data Structures & Algorithms handbook in The Engineering Handbook by Handbook Academy and contributors, licensed under CC BY-SA 4.0. The course structure, stage groupings and summaries on this page were written for Engineering Path. Credits & license.