Pergunta de entrevista da empresa Spyke Games

What is the time complexity of this code?