We will save ( m - 1 ) th node and later make it point to ( n - k + 1 ) th node
if ( count == m - 1 ) : NEW_LINE INDENT pre = c NEW_LINE link = c . next NEW_LINE DEDENT if ( count == n - k ) : NEW_LINE INDENT if ( m == 1 ) : NEW_LINE INDENT end = c NEW_LINE A = c . next NEW_LINE DEDENT else : NEW_LINE INDENT end = c NEW_LINE DEDENT DEDENT