Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


The element being searched for is not found in an array of
100 elements. What is the average number of comparisons
needed in a sequential search to determine that the element
is not there, if the elements are completely unordered?

Answers were Sorted based on User's Feedback



The element being searched for is not found in an array of 100 elements. What is the average number..

Answer / anirban lahiri

Allmost 50 comparison's are required. Because if we use
double pointer instead of single pointer and we run the
algo. untill we get that element. But that ele. is not in
that unordered list then the algo will stop and produces
"No match is found", when the pointers are superimpossed to
each other. That is we set an algo. of two pointer's in the
front and rear end and when each time the matching is not
found then one pointer is go on increasing and the other
one is go on decreasing( in location ).

Is This Answer Correct ?    6 Yes 24 No

Post New Answer

More Data Structures Interview Questions

What are the major data structures used in the rdbms?

0 Answers  


A list is ordered from smaller to largest when a sort is called. Which sort would take the longest time to execute?

12 Answers  


Why is waste sorting important?

0 Answers  


Is stack a dynamic data structure?

0 Answers  


Does array sort mutate?

0 Answers  


What is data and information explain with example?

0 Answers  


What do you mean by priority queue?

0 Answers  


How can someone display singly linked list from first to last?

0 Answers  


Explain the steps to insert data into a singly linked list?

0 Answers  


How do you find the time complexity of a bubble sort?

0 Answers  


Which is faster hashmap or hashset?

0 Answers  


Does treeset allow duplicates?

0 Answers  


Categories