Imagine you’re planning a road trip with friends across several cities, each with fun activities you don’t want to miss. Some friends can start setting up tents while others cook dinner, but things like packing the car or getting gas must happen in a certain order. To make sure you arrive everywhere on time, you figure out the longest chain of must-do-in-order stops — that’s your key route, and if any stop is late, the whole trip’s behind.

