EarnIn interview question

Adding elements in a linked list.