GUIDED STUDY / 31 LESSONS

Coding patterns

Recognize the pattern, explain it, and solve it step by step.

Lessons

  1. 01 / LESSON 001

    Sliding Window

    Most people solve this interview question the slow way.

  2. 02 / LESSON 002

    Binary Search

    Find one number in a billion in 30 guesses.

  3. 03 / LESSON 003

    Two Sum

    The most asked coding interview question ever.

  4. 04 / LESSON 007

    Hash Map

    The one trick behind half of all interview questions.

  5. 05 / LESSON 008

    Two Pointers

    Two fingers beat two loops.

  6. 06 / LESSON 009

    Dynamic Programming

    DP is just remembering answers.

  7. 07 / LESSON 010

    BFS vs DFS

    Two ways to escape a maze.

  8. 08 / LESSON 011

    Heap and Top K

    Find the top 10 without sorting a million.

  9. 09 / LESSON 012

    Intervals

    Merge overlapping meetings in one pass.

  10. 10 / LESSON 013

    Prefix Sums

    Answer any range sum instantly.

  11. 11 / LESSON 014

    Backtracking

    Every combination, without the chaos.

  12. 12 / LESSON 015

    Tries

    How does autocomplete find words so fast?

  13. 13 / LESSON 016

    Monotonic Stack

    The next greater element trick, in one pass.

  14. 14 / LESSON 017

    Tree Traversals

    Three orders, one line moved.

  15. 15 / LESSON 018

    Union-Find

    Are these two people connected?

  16. 16 / LESSON 019

    Valid Parentheses

    A stack solves this in one pass.

  17. 17 / LESSON 020

    Reverse a Linked List

    Three pointers. One loop. Zero panic.

  18. 18 / LESSON 021

    Longest Substring Without Repeats

    The window that jumps when it breaks.

  19. 19 / LESSON 022

    Number of Islands

    Count the islands with one flood fill.

  20. 20 / LESSON 023

    Best Time to Buy and Sell Stock

    Buy low, sell high, in one pass.

  21. 21 / LESSON 024

    LRU Cache

    The cache every senior interview asks for.

  22. 22 / LESSON 025

    Detect a Cycle

    The tortoise and the hare finds a loop in a linked list.

  23. 23 / LESSON 026

    Maximum Subarray

    Keep it or start over.

  24. 24 / LESSON 027

    Group Anagrams

    Sort the letters, find the family.

  25. 25 / LESSON 028

    Product Except Self

    Do it without division.

  26. 26 / LESSON 029

    Merge Two Sorted Lists

    The zipper merge. Two sorted lists, zipped into one.

  27. 27 / LESSON 151

    Turn constraints into an algorithm

    100,000 IDs. Is any ID repeated?

  28. 28 / LESSON 153

    Find the minimum ship capacity

    Four boxes, two days. Find the smallest capacity that works.

  29. 29 / LESSON 154

    Find the shortest maze path

    The shortest maze path is the first one breadth-first search finds.

  30. 30 / LESSON 161

    Count subarrays that sum to K

    Count all nonempty slices with a target sum, even with negative numbers.

  31. 31 / LESSON 162

    Schedule courses with prerequisites

    Find a valid course order with a queue, or detect a cycle.