Two Pointer Technique Problems Leetcode Python