2. Linear Search Time Complexity #

Created Sunday 05 January 2020

For linear search we have 3 cases:

  1. Best case - constant. Key matches the first element.
  2. Average case - something in between.
  3. Worst case - Not present in the array or present at the last place. Time O(n).