Abstract

A ‘move to the front’ dictionary data structure that supports O(log t) time access to objects last accessed t operations ago is described. This ‘Historical Search Tree’ is then used in two adaptive sorting algorithms. The first algorithm, ‘Historical Insertion Sort’, exploits the temporal locality present in a nearly sorted list rather than the more normally exploited spatial locality. The second of the new algorithms, ‘Regional Insertion Sort’, exploits both temporal and spatial locality. Regional Insertion Sort also gives rise to a new measure of presortedness Reg that is superior to all known measures of presortedness, in that any sequence regarded as nearly sorted by any other measure will also be regarded as nearly sorted by the measure Reg.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call