solutions to HackerRank problems