leetle

Daily challenge for 2025-08-24

236. Asteroid Collision

Write a function solve that simulates collisions between asteroids moving in a line. Positive values move right, negative move left. When two meet, the smaller one explodes; if equal, both explode. Return the state after all collisions.

Example:
Input: asteroids = [5,10,-5]
Output: [5,10]

Run this challenge interactively in Python or JavaScript when the app loads.