Two Pointer Approach Leetcode Javascript Interview