External Mergesort
Previous sorts all assume ...
- efficient random access to
Item s
- which suggests that data is in arrays in memory
- which limits sortable data to what fits in (virtual) memory
When the data is in disk files
- random access is inefficient (files are sequential access)
- but max data size can be much larger than memory
Mergesort accesses data sequentially ⇒ adapts to sorting files.
|