CLASS10 Fundamentals of Data Structures
CLASS10 Fundamentals of Data Structures
CLASS10 Fundamentals of Data Structures
By dividing the working data set in half with each comparison, logarithmic
performance, O (log n), is achieved. That performance can be improved
significantly when the data set is very large by using interpolation search,
and improved yet again by using binary search when the data set gets
smaller.
Linear Search
Clearly to employ this method you must first know where the data
collection begins and the size of the area to search. Alternatively, a
unique value could be used to signify the end of the search space.
Binary Search