Two Pointer Leetcode Problems On Python