Pregunta de entrevista de Boston Consulting Group

Asked about loop complexity of the implemented algorithm