Maximum Submatrix Leetcode Javascript Practice