text: Populate the count array such that count [ i ] contains count of characters which are present in str and are smaller than i
code: populateAndIncreaseCount ( count , str ) ; for ( i = 0 ; i < len ; ++ i ) { mul /= len - i ;