@walter It will NOT count the equal number as smaller number after self. So the answer will still be correct. For instance, if given original array [5,2,6,2,1], it will return [3,1,2,1,0]