Skip to content
RED SAG Skills
hard20 pts · first answer countsstacks-and-queues

Counting car fleets to a target

Cars drive to target = 12 on a one-lane road with positions [10, 8, 0, 5, 3] and speeds [2, 4, 1, 1, 3]. A faster car that catches a slower one joins it and moves at its speed as one fleet. How many fleets arrive?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions