Solves HackerRank's challenges