โ† McKinsey questions

Minimum cost to reach each city using two bus lines with switching cost

Filed under McKinsey

The question

Cities lie in a row with two bus lines that both visit all cities in order but take different times between cities. Moving to or starting on the blue line costs extra time, the red line costs none. Find the minimum cost to reach each city from the first.

No write-up yet. Related questions below have one.

Related McKinsey questions

Collected from public candidate posts and coding forums. Updated Nov 2026.