Asteroids move along a line: the absolute value is size, the sign is direction (positive → right, negative → left). All move at the same speed. When two collide, the smaller explodes (both if equal). Asteroids moving the same direction never meet. Return the state after all collisions.
Input: one line of space-separated non-zero integers. Output: the surviving asteroids, space-separated (empty if none survive).
5 10 -5
5 10
10 destroys -5.
8 -8
Mutual destruction.
10 2 -5
10
-5 destroys 2, then 10 destroys -5.
Run your code against the sample tests, or Submit to run the full suite.