Problem 1331 · Easy
Replace values with one-based ranks among distinct sorted values.
Open the interactive visualisation