Maximal Rectangle Area Leetcode Javascript