English

If the key to be searched is the last element in the list, then linear search algorithm will make how many comparisons? -

Advertisements
Advertisements

Question

If the key to be searched is the last element in the list, then linear search algorithm will make how many comparisons?

Options

  • n(n + 1)/2

  • n - 1

  • n

  • n + 1

MCQ

Solution

n

shaalaa.com
Linear Search
  Is there an error in this question or solution?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×