Solutions for programming challenges from www.hackerrank.com