Two Pointer Approach Leetcode Javascript 30