Pergunta de entrevista da empresa Datadog

Very easy coding questions, I don't see there are algorithms