Leetcode Two Pointers Problem