Populate the count array such that count [ i ] contains count of characters which are present in str and are smaller than i
populateAndIncreaseCount ( str ) ; NEW_LINE for i in range ( len1 ) : NEW_LINE INDENT mul = mul // ( len1 - i ) ; NEW_LINE DEDENT