Tried a couple of problems from hackerrank.com