Two Pointers Questions Leetcode 150