We are given an array asteroids of integers representing asteroids in a row. For each asteroid, the absolute value represents its size, and the sign represents its direction (positive meaning right, negative meaning left). If two asteroids meet, the smaller one explodes. If both are the same size, both explode.
- An array of integers
asteroids.
Input: asteroids = [5, 10, -5]
Output: [5, 10]
Explanation: 10 and -5 collide; 10 survives.