Ezvor

2371. Minimize Maximum Value in a Grid

HardArray Preparing judge… LeetCode
ArrayUnion-FindGraph TheoryTopological SortSortingMatrix

Hints

Hint 1
Can you think of which element in the grid you should replace first?
Hint 2
Replace the elements in the matrix from the smallest number to the largest. Replace each element with the smallest possible number so far.