An original programming contest problem written by Quora engineers, available in the Quora Codesprint happening now at http://quora.interviewstreet.com/.