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