c - rank of an element in a given array is calculated as no of smaller elements in that array no of equal elements to its left with this formula find the rank of element 3 that appears in two locations in below array 50343 - skillgun

first 3 located rank is 1 because only 0 is less than 3 and there are left elements which is equal to 3. second 3 rank is 2 because no of small elements are 1 and no of equal elements towards its right is is 1 (i.e 3). so total rank is 2.