Check for the minimum removals
j = N NEW_LINE while ( j >= 0 ) : NEW_LINE INDENT if ( dp [ N ] [ j ] >= K ) : NEW_LINE INDENT return ( N - j ) NEW_LINE DEDENT j -= 1 NEW_LINE DEDENT return - 1 NEW_LINE