Top Array Problems Leetcode Javascript 30