Experimenting with Sorting and Searching
- There are many ways to improve your command of sorting and searching procedures. You should by now be adept at 'ringing the changes' on demonstration programs.
- If the demonstration uses a file, try it with an array of records and vice-versa.
- If the demonstration is a list of simple types such as integers, try it with another type such as string and/or with an array of records.
- You could experiment to see which sorting routines are stable. (How do they cope with duplicate values). You could then adapt the searches to output all of the records with duplicate key fields.
- Try your own algorithms for hashing strings of common words and test the number of collisions they produce.
- Produce data sets that expose the deficiencies of different searching and sorting methods.
- Research other sorting methods such as the merge sort and radix sort and write Pascal procedures to implement them.