Leetcode Two Pointer Approach Python Programming