Pregunta de entrevista de Oracle

random leetcode question in medium-hard level.