Review: Activity-Selection Problem
l The activity selection problem: get your
money’s worth out of a carnival
n Buy a wristband that lets you onto any ride
n Lots of rides, starting and ending at different times
n Your goal: ride as many rides as possible
l Naïve first-year CS major strategy:
n Ride the first ride, when get off, get on the very
next ride possible, repeat until carnival ends
l What is the sophisticated third-year strategy?