Exercises from www.hackerrank.com