The complexity of linear search algorithm is:
2017
The complexity of linear search algorithm is:
Answer: B. O(n) — Linear search checks elements one by one .
- A.
O(n log n)
- B.
O(n)
- C.
O(log n)
- D.
O(n²)
Attempted by 1338 students.
Show answer & explanation
Correct answer: B
Linear search checks elements one by one .
Loading lesson…