Find The Pivot Integer Leetcode Javascript Question