Pregunta de entrevista de Zebu Infrastructure Online

Basic algorithm question