โ† Gojek questions
CodingReported in a candidate post, Jul 2025

Remove colliding adjacent equal balls and count collisions

Filed under Gojek

The question

Balls of various colours are in a line; two adjacent same-colour balls collide and vanish. Find the number of collisions and the leftover balls (azxxzy gives ay; abccbxyyxba gives aba).

No write-up yet. Related questions below have one.

Related Gojek questions

Collected from public candidate posts and coding forums. Updated Nov 2026.