Pergunta de entrevista da empresa MathWorks

Leetcode array based question on asteroids