Pergunta de entrevista da empresa NVIDIA

What is the time complexity of above subroutine?