Solutions to the questions on HackerRank