Search
⌘K

Leetcode 1632. Rank Transform of a Matrix

Assign the smallest possible positive integer rank to each matrix cell so that ranks in any row or column preserve the ordering of values (equal values get equal ranks). The challenge is to process values in increasing order while grouping equal-valued cells across rows/columns (e.g., with union-find) and propagating ranks based on prior row/column maxima to compute the unique minimal assignment.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.