Pergunta de entrevista da empresa Datadog

Previous projects, leetcode - easy-medium difficulty