The greedy bet
Grabbing the biggest coin that fits gives the fewest coins with 1, 5, 10 and 25. Does it with any coins?
Two cashiers make the same change. One grabs the biggest coin that still fits and never puts one back. The other fills a table of the fewest coins for every amount first. The panels show both piles, the checks each cashier spent, and the coins greedy wasted.
Preparing for interviews? The ten-week plan puts this in order with DSA and the design rounds.
Included with a plan
This lab 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.
the lesson Algorithm Design Patterns
The whole idea this lab came from, told start to finish.
on the path Module 2 of 11 in DSA: Choosing the attack
The lessons, boards and videos around this lab, in reading order.