Leetcode Maximal Rectangle Leetcode Javascript