Solutions to the problems in HackerRank Code Sprint Round 1