Driver program to test above functions
public static void main ( String [ ] args ) { CountSmaller small = new CountSmaller ( ) ; int arr [ ] = { 12 , 10 , 5 , 4 , 2 , 20 , 6 , 1 , 0 , 2 } ; int n = arr . length ; int low [ ] = new int [ n ] ; small . constructLowerArray ( arr , low , n ) ; small . printArray ( low , n ) ; } }