Pergunta de entrevista da empresa Point72

similar to leetcode 75 problems basically