Pregunta de entrevista de Evenset

Algorithm and Logic Question