Skip to content

Video lessons

Just watched one of our shorts? Every video here has the full lesson behind it: the same idea as an animation you step through, with an exercise and a quiz. Free, no sign-up.

60 videos · newest first

  • 01Four levels ·

    How many subarrays of 10,000 values sum to 100? 166,766,685,000 loop steps, or 10,000?

    Subarrays That Sum to K, Four Levels

    Hash Tables
    On TikTok and InstagramOpen lesson
  • 02Algorithm reels · 0:24

    Turn flaw into lawn. Not 4 edits. Just 2.

    Edit Distance

    Dynamic Programming
  • 03Explained out loud ·

    A shop's one server is in Frankfurt, the shopper is in Sydney, about 16,500 km away. Four round trips before the first picture: at least 660 ms, just for distance. An edge server 30 km away: 1.2 ms, and Frankfurt sees 20 requests out of 200,000.

    Why a CDN, Explained: 660 ms of Pure Distance, 1.2 ms From the Edge

    System Design
    On TikTok and InstagramOpen lesson
  • 04How it works ·

    50,000 drivers are moving. How does the app pick the one who gets your ride?

    50,000 Drivers Move: How Ride Matching Picks Your Driver

    System Design Cases
    On TikTok and InstagramOpen lesson
  • 05Algorithm reels · 0:16

    LCA of 0 and 4? Just 2 nodes visited.

    Lowest Common Ancestor

    Trees & BST
  • 06Guess the output ·

    1 + "2" and "3" - 1 in JavaScript. What prints?

    Guess the Output: JavaScript Plus and Minus

    Big-O
    On TikTok and InstagramOpen lesson
  • 07Algorithm reels · 0:16

    6 beats its parent 3. Still not a BST.

    Validate a BST

    Trees & BST
  • 08Race ·

    BFS on 10,000 nodes. Adjacency matrix: 100,000,000 neighbour checks. Adjacency list: 39,600. Same visit order, about 2,525 times less work.

    Graph BFS: Adjacency Matrix vs Adjacency List, Race

    Graphs
    On TikTok and InstagramOpen lesson
  • 09How it works ·

    The database's zone goes dark. Why does the app come back on the same name?

    The Database Zone Dies: How an RDS Multi-AZ Failover Works

    AWS for Interviews
    On TikTok and InstagramOpen lesson
  • 10Made in code ·

    Where does a key go?

    Where Keys Go

    Hash Tables
    On TikTok and InstagramOpen lesson
  • 11Explained out loud ·

    An agent gets 100 weather questions with a budget of 8 steps each, and 30 first calls write the date the wrong way. Hide the tool's error and those 30 loop until the budget stops them: 380 steps, 70 answers. Pass the error back: 230 steps, 100 answers.

    The Tool-Use Loop, Explained: Feed the Error Back and Keep a Step Budget

    AI & ML
    On TikTok and InstagramOpen lesson
  • 12Guess the output ·

    typeof null and typeof []. What does JavaScript say?

    Guess the Output: JavaScript typeof

    Big-O
    On TikTok and InstagramOpen lesson
  • 13Four levels ·

    Longest palindrome in abab...ab, 1,000 letters: 41,916,500 comparisons, or 3,999?

    Longest Palindromic Substring, Four Levels

    Strings
    On TikTok and InstagramOpen lesson
  • 14Algorithm reels · 0:41

    Image upload pipeline in 40 seconds.

    Design on AWS: Image Upload Pipeline

    AWS for Interviews
  • 15How it works ·

    One AWS policy says Allow. Another says Deny. Which one wins?

    One Policy Says Allow, One Says Deny: How AWS IAM Decides

    AWS for Interviews
    On TikTok and InstagramOpen lesson
  • 16Algorithm reels · 0:25

    Why one key melts the table.

    DynamoDB Hot Partition

    AWS for Interviews
  • 17Race ·

    The top 100 of 1,000,000 values. 100 passes for the max: 99,994,950 comparisons. A min-heap of 100: 1,007,248. Same 100 values, about 99 times less work.

    Top K: 100 Passes vs a Min-Heap, Race

    Heaps
    On TikTok and InstagramOpen lesson
  • 18Four levels ·

    Find 250,000 in a 1,000 × 1,000 sorted matrix: 406,259 cells checked, or 1,148?

    Search a Sorted Matrix, Four Levels

    Searching
    On TikTok and InstagramOpen lesson
  • 19Algorithm reels · 0:28

    One message, five workers.

    SQS vs SNS: Fan-Out + DLQ

    AWS for Interviews
  • 20Explained out loud ·

    A judge model compares a new model's answers with an old model's on 100 questions. With the new answer shown first it picks the new model 70 times. Swap the order and it picks it 30 times.

    LLM as a Judge, Explained: Position Bias and Asking in Both Orders

    AI & ML
    On TikTok and InstagramOpen lesson
  • 21How it works ·

    One cache server dies. Which keys have to move?

    One Cache Server Dies, Which Keys Move: How a Distributed Cache Works

    System Design Cases
    On TikTok and InstagramOpen lesson
  • 22Algorithm reels · 0:25

    One zone dies. The app stays up.

    Auto Scaling: One Zone Dies

    AWS for Interviews
  • 23Guess the output ·

    [1, 2, 10].sort() in JavaScript. What comes out?

    Guess the Output: JavaScript Sort

    Big-O
    On TikTok and InstagramOpen lesson
  • 24Algorithm reels · 0:27

    Allow s3:* says yes. Deny beats allow.

    IAM: Deny Beats Allow

    AWS for Interviews
  • 25Race ·

    Join 100,000 items, then find every root. Plain union-find: 4,999,950,000 pointer steps. Union by size + path compression: 199,996. Same components for every find, about 25,000 times less work.

    Union-Find: Plain vs Union by Size + Path Compression, Race

    Union-Find
    On TikTok and InstagramOpen lesson
  • 26How it works ·

    A model never reads letters or words. So what does it read?

    It Never Reads Words, So What Does It Read: How Tokenization Works

    AI & ML
    On TikTok and InstagramOpen lesson
  • 27Explained out loud ·

    A limit of 100 requests a minute. Send 100 in the last second of one minute and 100 in the first second of the next: a fixed window lets all 200 through. A token bucket lets 103.

    Rate Limiting, Explained: Fixed Window vs Token Bucket at the Minute Boundary

    System Design
    On TikTok and InstagramOpen lesson
  • 28Guess the output ·

    Remove every item from a list while looping over it. What is left?

    Guess the Output: Remove While Looping

    Cheat sheets
    On TikTok and InstagramOpen lesson
  • 29Four levels ·

    Rotate 1,000,000 items right by 250,000: 250,000,000,000 moves, or 1,000,000?

    Rotate an Array, Four Levels

    Arrays
    On TikTok and InstagramOpen lesson
  • 30Algorithm reels · 0:15

    Which words does "bank" listen to?

    Attention, Intuitively

    AI & ML
  • 31How it works ·

    Two people type in the same spot, at the same moment. Whose edit wins?

    Two People Type in the Same Spot, Who Wins: How a Collaborative Editor Works

    System Design Cases
    On TikTok and InstagramOpen lesson
  • 32Algorithm reels · 0:21

    Top 4 of 10? The root decides.

    Top K Elements

    Heaps
  • 33Race ·

    The max of every window of 1,000 in 100,000 values. Rescanning each window: 98,901,999 value comparisons. A monotonic deque: 199,760. Same 99,001 maxima, about 495 times less work.

    Sliding Window Maximum: Rescan vs Deque, Race

    Stacks & Queues
    On TikTok and InstagramOpen lesson
  • 34Four levels ·

    10,000 votes, one name holds more than half: 100,010,000 loop steps to find it, or 10,000?

    Majority Element, Four Levels

    Arrays
    On TikTok and InstagramOpen lesson
  • 35Algorithm reels · 0:18

    Limit: 4 per second. One lets 8 through.

    Rate Limiting: 4 Algorithms

    System Design
  • 36Explained out loud ·

    Bank can mean money or the side of a river. In "she sat by the river bank", attention gives river 79% of the weight, and bank means water. Swap in cash, and it means money.

    Attention, Explained: How the Word Bank Picks Money or River

    AI & ML
    On TikTok and InstagramOpen lesson
  • 37How it works ·

    5 million jobs a day, and any worker can die mid-job. So why does the job still run?

    Worker Dies Mid-Job, the Job Still Runs: How a Job Scheduler Works

    System Design Cases
    On TikTok and InstagramOpen lesson
  • 38Algorithm reels · 0:18

    4 slots. A 5th key. Who gets evicted?

    LRU Cache

    Low-Level Design
  • 39Guess the output ·

    (1) and (1,). Which one is a tuple?

    Guess the Output: Tuple Comma

    Cheat sheets
    On TikTok and InstagramOpen lesson
  • 40Algorithm reels · 0:19

    14 pair checks? Try 6 lookups.

    Two Sum

    Hash Tables
  • 41Race ·

    Load 10,000 jobs and all their parts. The N+1 loop: 10,001 statements sent. One JOIN: 1. Same 30,000 rows.

    Database Queries: N+1 vs One Join, Race

    SQL
    On TikTok and InstagramOpen lesson
  • 42How it works ·

    Something big happens: 200,000 notifications a minute. How is none lost, and none sent twice?

    200,000 a Minute, None Lost, None Twice: How a Notification System Works

    System Design Cases
    On TikTok and InstagramOpen lesson
  • 43Made in code · 0:19

    Same maze. Same speed.

    Two Ways Out

    Graphs
  • 44Explained out loud ·

    One server answers 800 requests a second and the peak brings 3,000. A bigger machine, or four small servers behind a load balancer? And why does scaling out log people out?

    Vertical vs Horizontal Scaling, Explained: One Bigger Machine or Four Small Servers for 3,000 Requests a Second

    System Design
    On TikTok and InstagramOpen lesson
  • 45Guess the output ·

    return 1 in try, return 2 in finally. What does f() return?

    Guess the Output: Return in Finally

    Cheat sheets
    On TikTok and InstagramOpen lesson
  • 46Made in code · 0:19

    Four rules. No player.

    The Glider Gun

    Matrix & Grid
  • 47Four levels ·

    Count every 1 bit in all the numbers 0 to 999,999: 19,951,425 loop steps, or 20?

    Count the Set Bits, Four Levels

    Bit Manipulation
    On TikTok and InstagramOpen lesson
  • 48Algorithm reels · 0:19

    One hop: 9 ms. Two hops: 5 ms.

    Dijkstra's Algorithm

    Graphs
  • 49How it works ·

    Cat and kitten: different words, nearly the same meaning. How does a machine know?

    Two Different Words, Same Meaning: How Embeddings Work

    AI & ML
    On TikTok and InstagramOpen lesson
  • 50Algorithm reels · 0:16

    Merge 6 intervals into 3 blocks.

    Merge Intervals

    Intervals
  • 51Race ·

    Find 1,000 letters in 1,000,000. Naive search: 999,001,000 character comparisons. KMP: 2,000,997, table included.

    Pattern Search: Naive vs KMP, Race

    Strings
    On TikTok and InstagramOpen lesson
  • 52Four levels ·

    60 stairs, 1 or 2 steps at a time: how many ways? 5,009,461,563,921 calls, or 7?

    Climbing Stairs, Four Levels

    Dynamic Programming
    On TikTok and InstagramOpen lesson
  • 53Algorithm reels · 0:19

    One tree, 4 orders. Which one is sorted?

    Tree Traversals

    Trees & BST
  • 54Explained out loud ·

    1,000 requests in one minute. The dashboard shows the average: 177 ms, looks healthy. But 20 of them took more than 2 seconds, and the 99th percentile is 3,082 ms.

    Average Latency vs the 99th Percentile, Explained: 177 ms on the Dashboard, 20 Requests Over 2 Seconds

    System Design
    On TikTok and InstagramOpen lesson
  • 55How it works ·

    Why does a chatbot forget the start of a long chat?

    Why Does a Chatbot Forget the Start of a Chat? Context Windows

    AI & ML
    On TikTok and InstagramOpen lesson
  • 56Algorithm reels · 0:21

    Pop until smaller. Nobody waits twice.

    Monotonic Stack

    Stacks & Queues
  • 57Guess the output ·

    One generator, read twice. What does the second read print?

    Guess the Output: Generator Twice

    Cheat sheets
    On TikTok and InstagramOpen lesson
  • 58Algorithm reels · 0:17

    45 subarrays? Kadane reads just 9.

    Kadane's Algorithm

    Arrays
  • 59Race ·

    A queue of 100,000. Serve them all, front first. list.pop(0): 5,000,050,000 steps. deque.popleft(): 100,000.

    Queue: List vs Deque, Race

    Stacks & Queues
    On TikTok and InstagramOpen lesson
  • 60How it works · 0:42

    The model never saw your documents. How does it answer from them?

    It Never Saw Your Docs: How RAG Answers

    AI & ML