solutions to problems on hackerrank.com