If the character which comes out then decrement the count by 1
if ( P [ left - 1 ] in Q ) : NEW_LINE INDENT count -= 1 NEW_LINE DEDENT if ( count < K ) : NEW_LINE INDENT break NEW_LINE DEDENT return ans NEW_LINE