Pregunta de entrevista de Bloomberg

Calculate time complexity of your algorithm