Multiple choice

Which of the following is correct?

A. Running time cost O(n) B. Running time cost O(1) C. Running time cost O(logn)

  1. A search operation in an ordered list will take C.

  2. An insert operation in an ordered list will take B.

  3. A search operation in an un ordered list will take B.

  4. An insert operation in an un ordered list will take A.

  5. 1 and 2 are correct.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

This is correct. In an ordered list searching will take up O(log n) time using binary search