Challenges taken from http://www.programming-challenges.com