solutions to hackerrank problems