Pregunta de entrevista de F5

basic algorithmic questions, nothing complicated