Solutions to HackerRank programming problems