Multiple choice technology architecture

The complexity of linear search algorithm is

  1. O(n)

  2. O(log n)

  3. O(n2)

  4. O(n log n)

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

Linear search has O(n) time complexity because in the worst case it must examine each of the n elements once. The runtime grows linearly with the input size.