Two Pointer Approach Leetcode Problem