exercises from hackerrank.com