101 2 Suppose you are trying to look for a persons name in a

10.1) #2

Suppose you are trying to look for a person\'s name in a phonebook that is organized alphabetically. Would it be more efficient to perform a linear search or a binary search? Explain.

Solution

Binary search :It is more efficient method to look for for a person name in a phonebook that is organised alphabetically.if a list is sorted previously the binary search is able to produce effectively.

It is more good than the linear search and also permits the quick addition and removal of items operation to find the person mame in a phone book .

1.The best choice to know the person name in a phonebook is associative data structure .

2.Usually the data structure applied as a hash table or bionary search tree which preserves the data in the form of key=value pair.

3.Question the data structure with the key that responses the value.the key value is name of a person and value is the phone number.

4.Applying binary search is somewhat tough.

10.1) #2 Suppose you are trying to look for a person\'s name in a phonebook that is organized alphabetically. Would it be more efficient to perform a linear sea

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site