Two Pointer Problems Leetcode Javascript Solutions