← ALL NOTES
Array

735. Asteroid Collision

Asteroids move right (+) or left (−); when a right-mover meets a left-mover, the smaller explodes (or both, if equal). Same-direction asteroids never collide. The key realisation is that a collision…

Loading…