Two Pointer Approach Leetcode Problems Python