My attempt at solving challenges from HackerRank