Last Truck to Leave a Lane
Last Truck to Leave a Lane
A one-dimensional lane spans [0, laneLength]. There are n trucks at distinct initial positions. Truck i starts at position[i] with velocity velocity[i]:
- A p...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
