Two Pointer Technique Leetcode Problems Python