What is the worst-case time complexity of the linear search algorithm for an…

Bihar STET · PGT (Paper 2) · Computer Science · 2024

What is the worst-case time complexity of the linear search algorithm for an array of size "n"?

  1. A.

    O(log n)

  2. B.

    O(n)

  3. C.

    O(n^2)

  4. D.

    O(1)

Attempted by 25 students.

Show answer

Correct answer: B

The worked solution is available to enrolled students.

Explore the full course: Bihar Stet Paper Ii Computer Science

Loading lesson…