Pregunta de entrevista de Citi

Solve some coding problems and explain the thinking behind your answers.