Stores the frequency of each array element
int count [ ] = new int [ mx + 1 ] ; for ( int i = 0 ; i < mx + 1 ; i ++ ) { count [ i ] = 0 ; } for ( int i = 0 ; i < n ; i ++ ) { count [ arr [ i ] ] ++ ; }