Nokia Interview Question

Solving some programming problems.