Pregunta de entrevista de Citadel Securities

Leetcode hard coding question and an extension