A programming excercise for an interview