I know the algorithm to find the maximum 2D submatrix is O(m^2*n) with the use of Kadane's algorithm, where m is the columns and n is the rows. But is there an algorithm for finding the maximum 2D submatrix if we have to ignore exactly 1 element in the entire matrix (i.e. we would change its value to 0 and then we would get the maximum submatrix)?
I'd like the time complexity to not be much higher, but I can't find an efficient way to do it. It seems that the difficulty is knowing which element to ignore without trying all elements 1 by 1 and then calculating the maximum submatrix everytime, which would be O(m^3*n^2) I believe. I'm not even sure if that's possible, but I feel like there might be a way.
Edit: I saw this article for a O(n) solution with 1-d array, but I think generalizing it to higher dimension arrays is not that straightforward. It might be a valid hint though.