Finding things Quickly III: Binary Search
Let’s assume that the file is sorted and that we are looking for record whose key is Kelly in a file of 1000 fixed-length records.
1 2
….
500
1000
1: Johnson
750
2: Monroe
Next Comparison
Previous slide
Next slide
Back to first slide
View graphic version