Pregunta de entrevista de Nokia

Solving some programming problems.