|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Problems
Problem 1.1:
What are the best, worst, and average case times of binary search?
[Solution]
Problem 1.2:
If there are 22,049 data elements being searched, what is the maximum number of "looks" it will take with binary search to find the data element being search for?
[Solution]
Problem 1.3:
Will binary search always be faster than linear search, even on a large data set?
[Solution]
Problem 1.4:
Why won't binary search work on linked lists?
[Solution]
Problem 1.5:
Sorting of a data set can be done in O(nlogn) time. You have in front of you a large data set that is in unsorted order. You need to complete n searches on this data set. Does it make more sense to use linear search, or to sort it and use binary search.
[Solution]
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contact Us | Privacy Policy | Terms and Conditions | About
©2006 SparkNotes LLC, All Rights Reserved.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||