Fitch Group interview question

leetcode easy. linked list question.