Pregunta de entrevista de Datadog

Previous projects, leetcode - easy-medium difficulty