Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Rotting Oranges

MediumLeetCode 994 ↗

The problem, in one line. Given a grid of empty cells, fresh oranges and rotten oranges, where each minute every rotten orange rots its four neighbours, return how many minutes until no fresh orange is left, or -1 if some never rot. LeetCode 994.

The tell. Something spreads outward one step at a time from several places at once, and the question asks for time. Rounds of spreading are levels of breadth-first search, and several starting points go into the queue together.

Included with a plan

This solution is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.