Thoughtworks interview question

Programming in 20 minutes.