CSC300
:
What's the result?
[2/13]
01
02
03
for
(
long
i
=
N
;
i
>
0
;
i
=
i
-
1
)
{
result
=
result
+
1
;
}
Choices:
independent of N -- constant
~ lg N -- logarithmic
~ (lg N)^2 -- log squared
~ N -- linear
~ 2N -- linear
~ N(lg N) -- linearithmic
~ (N^2)/2 -- quadratic
~ N^2 -- quadratic
~ N^3 -- cubic
~ 2^N -- exponential