
Computer Science
Sorting and merging
The two most important file operations that do not involve adding to or
deleting from a file are sorting and merging. Sorting a file means putting it
into order, either numerically or alphabetically. Merging means combining
sorted files in such a way as to preserve their sorted order. The order can be
ascending, such as ascending numbers 1, 3, 7, 15, 22, 36, or ascending
alphabetical order of A to Z. Less common is descending order of number,
and the inverse alphabetical order of Z to A. Number sorting is much easier,
assuming that numbers are held in number form rather than in string form,
but curious problem ...