NewProject Coding is here — build features and fix bugs in real codebases with an AI assistantSee what's new

(This question is a variation of the LeetCode question 735. Asteroid Collision. If you haven't completed that question yet, it is recommended to solve it first.)

Given two arrays, one for asteroid masses and one for their speeds, simulate the collisions among the asteroids.

Test Cases
Input
Output
Expected