Posts

Showing posts with the label Divide & Conquer

Finding out how many elements are larger than remaining elements [reviewed]

Image
Problem Given an array of elements, return an array of values pertaining to how many   elements are greater than that element remaining in the array.   e.g [3,4,5,9,2,1,3]      return [3,2,1,0,1,1,0]   Running time should be faster than O(N^2)