The complexity of linear search algorithm is:

2017

The complexity of linear search algorithm is:

  1. A.

    O(n log n)

  2. B.

    O(n)

  3. C.

    O(log n)

  4. D.

    O(n²)

Attempted by 760 students.

Show answer & explanation

Correct answer: B

Linear search checks elements one by one .

Explore the full course: Up Lt Grade Assistant Teacher 2025