CS 206: Data Structures
Assignment#6
Due on Thursday, April 5
Repeat Assignment#5 but this time, prior to searching for towns, sort the data so that it is in acsending order of town names. You may use any sorting algorithm discussed in class for sorting the data. As in Assignment#5, output the number of comparisons performed during searches. Compute the average number of comparions needed to answer a query, the average number of comparisions needed to answer a successful query, the average number of comparisons needed to answer an unsuccessful query. Compare these averages with those obtained from Assignment#5. Discuss the results obtained.
What to Hand-in: