第1話The cat who knew every shortcut

Every city is a data structure. She knows all of them.

Walking box to box is slow. She just jumps to number four.

Only the top one ever falls. Last in, first out.

Each one only knows the next. Skip one, and it's gone.

Bigger? Right. Smaller? Left. Three choices and she's there.

Check everything one hop away. Then two. The way home appears.

Next episode: you.

つづくto be continued

Episode 1: The cat who knew every shortcut

Scroll through an anime episode and watch a black cat leap, swat and climb her way through arrays, stacks, linked lists, binary search trees and BFS.

  1. Cold open

    Amber light falls through venetian blinds. A black cat walks in and sits, her giant shadow on the wall behind her.

    Every city is a data structure. She knows all of them.

  2. Boxes: Array

    Eight cardboard boxes numbered 0 to 7. She walks from box 0 to box 1, then leaps straight into box 4.

    Walking box to box is slow. She just jumps to number four.

    Any index, one jump.

  3. The bookshelf: Stack

    A pile of books on a desk. She swats the top book off, another book drops onto the pile, and she swats that one off too.

    Only the top one ever falls. Last in, first out.

    Push on top. Pop from the top.

  4. Yarn and tin cans: Linked list

    Tin cans tied in a line with yarn, each can to the next. She follows the thread, then cuts can 3 out and ties can 2 straight to can 4.

    Each one only knows the next. Skip one, and it's gone.

    Every node points to the next.

  5. The lantern tree: Binary search tree

    A tree of numbered paper lanterns at sunset. Looking for 45, she climbs from 50 to 30 to 40 to 45, and each lantern lights up as she reaches it.

    Bigger? Right. Smaller? Left. Three choices and she's there.

    Every choice halves the search.

  6. Rooftops at night: Breadth-first search

    Rooftops linked by power lines. Light spreads out one hop at a time until it reaches the green window of home, then she runs the shortest way there.

    Check everything one hop away. Then two. The way home appears.

    Nearest first. The first way found is the shortest.

  7. Dawn

    She sits on a ledge facing a huge rising sun, and glances back at you. To be continued.

    Next episode: you.