Two Pointer Approach Leetcode Python