What is the efficiency of linear search?

a. O(1).
b. O(log n).
c. O(n).
d. O(n2).


c. O(n).

Computer Science & Information Technology

You might also like to view...

Which of the following would be a base case for a summation algorithm (the sum of the numbers from 0 to n)?

a. If n = 0 then summation(n) = 0 b. if n > 0 then summation(n) = 5 c. If n > 0 then summation(n) = get Value(n) d. If n > 0 then summation(n) = n + summation(n-1) e. None of these

Computer Science & Information Technology

Which of the following is true?

A) Both the Set and List interfaces extend the Collection interface B) Both the Set and Map interfaces extend the Collection interface C) Both the List and Map interfaces extend the Collection interface D) None of the above

Computer Science & Information Technology

Which button on the Recording toolbar stops the clock?

A. Repeat B. Pause C. Slide Time D. Next

Computer Science & Information Technology

This is the first index in a string.

a. - 1 b. 1 c. 0 d. The size of the string minus one

Computer Science & Information Technology