For each character in formed string , increment freq in the corresponding freq array
for i in range ( N ) : NEW_LINE INDENT freq [ arr [ i ] ] = freq [ arr [ i ] ] + 1 NEW_LINE DEDENT count = 0 NEW_LINE