Pregunta de entrevista de Visier

Question related to algorithm runtime