Frequency array to store the frequency of each of the character of the current string
num = [ 0 ] * 26 NEW_LINE for j in range ( len ( st ) ) : NEW_LINE INDENT num [ ord ( st [ j ] ) - ord ( ' a ' ) ] += 1 NEW_LINE DEDENT flag = True NEW_LINE