Pregunta de entrevista de MathWorks

Leetcode array based question on asteroids