Solutions to HackerRank challenges