Function to generate an array which contains count of smaller elements on the right
static void constructLowerArray ( int arr [ ] , RefInteger [ ] countSmaller , int n ) { int i , j ; Node root = null ; for ( i = 0 ; i < n ; i ++ ) countSmaller [ i ] = new RefInteger ( 0 ) ;