Two Pointer Problems Leetcode Javascript Interview