Amazon Interview Question

What is the complexity of the code on the board?