solutions to hackerrank