Pregunta de entrevista de Apple

Exclusively whiteboard algorithm questions.