CodingEasy
Replace each element in an array with its rank
Filed under Hexaview
The question
Given an array of distinct integers, replace every element with its corresponding rank where the smallest element is given rank 1 (or highest rank).
No write-up yet. Related questions below have one.
Related Hexaview questions
Collected from public candidate posts and coding forums. Updated Nov 2026.