Pregunta de entrevista de Datadog

A few algorithm exercises to solve.