Solutions for problems from hackerrank.com