Solutions to some HackerRank challenges