Linked List Problem In Leetcode Two Sum Solution In Python