Data Structures and Algorithms
Workshop 2
Searching
- Download and save into your directory from the download window:
- binsearch.c
- Copy your original collection.c to collection_bs.c and
replace FindInCollection with the binary search version.
- Modify AddToCollection to insert new items in sorted order.
- Time add and find operations and verify that you have
the expected behaviour of the time vs n plot.
- Compare the absolute times with those obtained for
add and find operations in the previous workshop.
Submit the assignment using the same
procedure as before.
Workshop 3 & 4
Table of Contents
© John Morris, 1996