Boston Consulting Group Interview Question

Asked about loop complexity of the implemented algorithm