Available question text
Given a string of directions for cars moving at equal speed on an infinite road, compute the total collisions where opposite-moving cars collide (+2) and moving cars hitting stationary ones add +1, with collided cars becoming stationary. The challenge is to identify which moving cars will inevitably collide (excluding those that move away off the ends) and count collisions efficiently for up to 1e5 cars.
Related questions
Continue with questions that share topics or the same question type.
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 2211. Count Collisions on a Road
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source