A coding exercise for an interview.