Stores the current number of unique characters and characters occuring atleast K times
cnt , count_k = 0 , 0 NEW_LINE while ( end < n ) : NEW_LINE INDENT if ( cnt <= curr_unique ) : NEW_LINE INDENT ind = ord ( s [ end ] ) - ord ( ' a ' ) NEW_LINE DEDENT DEDENT