Available question text
Robots move 1 unit/sec left or right and instantly swap directions on collision; compute the sum of pairwise distances after d seconds modulo 1e9+7. Using the observation that collisions only swap identities (so final positions are nums[i] ± d), the task reduces to efficiently computing the sum of absolute differences among those final coordinates (e.g., via sorting and prefix sums).
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 2731. Movement of Robots
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source