Pregunta de entrevista de Datadog

Quite interesting take-home task, typical coding interview