A little interview question I had come across, which I turned into a coding exercise and shared with some friends.