2371. Minimize Maximum Value in a Grid
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.
Preparing judge…