
984 A Practical Guide to Data Structures and Algorithms Using Java
• Θ(1) is known as constant asymptotic time complexity.
• Θ(log n) is known as logarithmic asymptotic time complexity.
• Θ(
1
(n))
• Θ(n) is known as linear asymptotic time complexity.
• Θ(n log n)
• Θ(n
2
) is known as quadratic asymptotic time complexity.
• Θ(n
3
) is known as cubic asymptotic time complexity.
Observe that Θ(log n) does not include the base of the logarithm. The reason for this decision, is
that for any constants a and b,
lim
n→∞
log
a
n
log
b
n
= lim
n→∞
ln n
ln a
ln b
ln n
= lim
n→∞
ln b
ln a
which is a constant. So log
a
n = Θ(log
b
n). Table B.2 uses a base of 2.
A polynomial-time algorithm ...