 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
If
there are N nodes in the list;
|
|
|
|
– |
the
number of operations that the function requires is
|
|
|
proportional
to N.
|
|
|
|
– |
For
example, there are N+1 assignments and N print
|
|
|
|
operations,
which together are 2*N+1 operations.
|
|
|
|
– |
According
to the rules we just learned about, we can
|
|
|
|
ignore
both the coefficient 2 and the constant 1; they
|
|
|
|
are
meaningless for large values of N.
|
|