Skip to Main Content
Computer Science
book

Computer Science

by Ian Sinclair
May 2014
Beginner content levelBeginner
186 pages
9h
English
Newnes
Content preview from Computer Science
File processing and management
\
######################################
Original list
\
Lower Upper
Test: not half way down
Ί. «
Test: in second half
J ^
/
I
New lower
Mid
Old upper
Test: not half way down
]
St 2
Test: in first half
J
r
/
I \
Same lower
Mid
New upper
Test: mid is correct
\ o
t
END of search.
J
μ
Figure 7.3 ^4 binary search used to find a record
The algorithm in Figure 7.4 deals with the altering list size by using one
variable for the number that is at the start of the list and another variable for
the number that is at the end of the list. Each time a list is divided and there is
no match between the first field name and
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Computer Science

Computer Science

Robert Sedgewick

Publisher Resources

ISBN: 9781483104256