Pregunta de entrevista de Palantir Technologies

Modified leetcode question from their bank