Two Pointers Leetcode Solutions Python