auxiliary ( count ) array to store count . Initialize count array as 0. Size of count array will be equal to ( max + 1 ) .
int t = max + 1 ; int count [ t ] ; for ( int i = 0 ; i < t ; i ++ ) count [ i ] = 0 ;