HackerRank Day 15: Linked List problem solution - TheCScience