Assigns each element a unique rank based on its position after sorting.
Tied elements receive different ranks depending on their original order. This is the only method that guarantees all ranks are distinct.