Two Pointer Technique Leetcode Python