Bloomberg Interview Question

What is the complexity of the program?