Rev interview question

What’s the time complexity of your code