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