Two Pointer Method Leetcode Solutions Python