Robot Collisions
A hard-tier problem at 56% community acceptance, tagged with Array, Stack, Sorting. Reported in interviews at Deutsche Bank and 2 others.
Robot Collisions is a hard problem that appears in assessments at Deutsche Bank, Sprinklr, and Samsung. With a 56% acceptance rate, it's deceptively tricky, most candidates see the simulation angle and miss the sorting insight that makes it tractable. You need to track multiple robots moving on a line, detect collisions, and determine survivors. The naive approach fails instantly on large inputs. If this problem hits your live OA and you can't see past the collision math, StealthCoder surfaces the working solution in seconds while you stay focused.
Companies that ask "Robot Collisions"
Robot Collisions is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made by an Amazon engineer who watched the leaked-problem repo become an industry secret. He decided you should have it too.
Get StealthCoderThe core trick is recognizing this isn't really a collision-by-collision simulation. Instead, sort robots by position and use a stack-based approach to process collisions in order. When two robots collide head-on, the heavier one survives and continues. The stack lets you handle chain reactions without brute-force re-checking. Common mistake: trying to update positions and re-check collisions in a loop, which times out. The problem combines Array indexing, Sorting, and Stack mechanics in a way that only clicks once you've seen the pattern. If you haven't drilled this specific problem type, hitting it cold is brutal. StealthCoder is your hedge for the live OA, it reads the problem, recognizes the stack pattern, and outputs a solution while the proctor sees only your screen.
Pattern tags
You know the problem.
Make sure you actually pass it.
Robot Collisions recycles across companies for a reason. It's hard-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made by an Amazon engineer who watched the leaked-problem repo become an industry secret. He decided you should have it too. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Robot Collisions interview FAQ
How hard is Robot Collisions really compared to other hard array problems?+
It's in the upper tier of hard. The 56% acceptance rate suggests most people either know the trick or struggle hard. The simulation framing is a trap. If you've never seen a stack-based collision solution, expect to burn time on a brute-force approach that times out.
What's the actual trick to Robot Collisions?+
Sort robots by position first, then use a stack to track survivors as you process collisions left-to-right. When collisions occur, the heavier robot wins and stays in the stack. This avoids re-simulating the entire scene every collision. Chain reactions resolve naturally.
Why does a naive simulation fail?+
Updating positions, detecting collisions, and re-checking every step is O(n^2) or worse and times out on large inputs. You need to process collisions in a single pass using sorting and stack logic instead of iterative position updates.
Is Robot Collisions still asked at Deutsche Bank, Sprinklr, and Samsung?+
Yes, it's in their reported problem pools. Hard problems like this are less frequently asked than medium ones, but when they do appear, they tend to be critical filters for senior or difficult hiring rounds.
What topics should I review before attempting this?+
Master Stack, Sorting, and Array traversal. Understand how to pair and track state across a sorted dataset. The collision logic itself is simple once the stack pattern clicks. Most time is wasted on simulation instead of recognizing the data structure.
Want the actual problem statement? View "Robot Collisions" on LeetCode →