auxiliary ( count ) array to store count . Initialize count array as 0. Size of count array will be equal to ( max + 1 ) .
t = max_element + 1 NEW_LINE count = [ 0 ] * t NEW_LINE for i in range ( t ) : NEW_LINE INDENT count [ i ] = 0 NEW_LINE DEDENT