Pregunta de entrevista de Block

Random pair programming problems. Nothing difficult.