This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingReplace values by ranks among their sorted distinct peers.
What this asks
Replace each value in an array by its rank among the sorted distinct values.
Copy, sort, deduplicate, then map; equal values share one rank.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing