Page 1 of 1

Searching an efficient algorithm

Posted: Fri Jul 03, 2015 5:13 pm
by MPC1984
Hi everybody!

I want to know if there is an algorithm that: given an unsorted array, I want to go element by element and know the number of subsequent elements that are smaller than the current one.

If that algorithm doesn't exist, could someone give me one efficient, please?

Thanks in advance. :wink: