Pergunta de entrevista da empresa Datadog

What is the time complexity (O) of the algorithm?