Pregunta de entrevista de VacuumLabs

They asked an algorithm question