Amazon interview question

Leetcode easy coding question on Linked Lists