Greedy algorithms
Watch three greedy rules book one room, and see which one always wins.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 2 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moExplain it simply
Each bar is a meeting, from its start hour to its end hour. Two bars that share time can't both use the room. You want to fit as many meetings as you can. Trying every possible set works, but the number of sets doubles with each new meeting.
8 meetings, A to H, sit on a time axis from hour 8 to hour 20. A runs from 18 to 20. B runs from 11 to 13. C runs from 9 to 12. D runs from 8 to 16. E runs from 17 to 19. F runs from 13 to 17. G runs from 14 to 15. H runs from 15 to 18.
Pick the largest set S in which no two meetings share time.
- 5 more stages and 2 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.