Pregunta de entrevista de Point72

similar to leetcode 75 problems basically