Comparisons in the sequential search

What do you mean by sequential search? Find out the average number of comparisons in the sequential search?

E

Expert

Verified

Sequential search: In searching an element in an array, the search begins from the first element till the last element. Average number of comparisons in the sequential search is (N+1)/2 where N is the size of array. If the element is in first position then the number of comparisons will be 1 and if the element is in last position then the number of comparisons will be equivalent to N.

   Related Questions in Data Structure & Algorithms

©TutorsGlobe All rights reserved 2022-2023.