public static void main(String args[]) {
        CountSmallerOnRight csr = new CountSmallerOnRight();
        int nums[] = {5, 2, 6, 1, 0, 3};
        List<Integer> result = csr.countSmaller(nums);
        result.forEach(r -> System.out.print(r + " "));
    }
Date 03/01/2016
@author Tushar Roy

Count number of smaller elements on right side of an array for every element.

Time complexity is O(nlogn)
Space complexity is O(n)

https://leetcode.com/problems/count-of-smaller-numbers-after-self/
src/com/interview/array/CountSmallerOnRight.java