adding solution for largestsubmatrix