Available question text
For each car in increasing position order, determine the time it first collides with the next car ahead, accounting for the fact that cars can merge into slower fleets; the challenge is to compute these times efficiently for up to 1e5 cars by sweeping right-to-left and using a monotonic stack of candidate fleets, discarding candidates that would collide after they themselves merge.
Related questions
Continue with questions that share topics or the same question type.
- Car Fleet
Coding
- Car Pooling
Coding
- Car Rental Optimization
Coding
- Race Car
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1776. Car Fleet II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source