Rev Interview Question

What’s the time complexity of your code