locate the point (5,0), (-2.5), (-3.5), (6-1) on the graph
Answers
Answer:
We use big-Θ notation to asymptotically bound the growth of a running time to within constant factors above and below. Sometimes we want to bound from only above.
For example, although the worst-case running time of binary search is \Theta(\log_2 n)Θ(log
2
n)\Theta, left parenthesis, log, start base, 2, end base, n, right parenthesis, it would be incorrect to say that binary search runs in \Theta(\log_2 n)Θ(log
2
n)\Theta, left parenthesis, log, start base, 2, end base, n, right parenthesis time in all cases. What if we find the target value upon the first guess? Then it runs in \Theta(1)Θ(1)\Theta, left parenthesis, 1, right parenthesis time. The running time of binary search is never worse than \Theta(\log_2 n)Θ(log
2
n)\Theta, left parenthesis, log, start base, 2, end base, n, right parenthesis, but it's sometimes better.