Google Interview Question

The main difficulty was writing code on paper without a compiler to check your errors.