Introduction to Complexity Theory/Big O Algorithm Analysis/Quiz

< Introduction to Complexity Theory < Big O Algorithm Analysis

1. Which of the following is the most efficient?

O\left(2^{n}\right)
 O\left(\log\left(n\right)\right)
 O\left(n^{3}\right)
 O\left(4n^{3}\right)

2. In how many steps would the binary search algorithm halt if it were to search for the value 17, in the set S=\left\{2,3,5,7,11,13,17,19,23\right\}?


3. What is the big O of the algorithm mentioned in the previous question?

O\left(\log\left(n\right)\right)
 O\left(n\right)
 O\left(c\right)
O\left({n \log\left(n\right)}\right)

Your score is 0 / 0
This article is issued from Wikiversity - version of the Thursday, January 29, 2009. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.