HackerRank practice code.