The problem, in one line. Cars drive toward one target on a single lane and cannot pass, so a fast car that catches a slower one joins it. Count how many groups arrive. LeetCode 853.
The tell. Order on the road never changes, and a car’s fate depends only on the car just ahead of it. When each item is compared with the nearest one before it, process in that order and keep a stack of what is ahead.