Abstract
This paper presents an algorithm for sorting a collection of items that are already almost sorted. It is assumed that each item has a sorting key associated with it and that it is desired to arrange the items so that their keys are in ascending order. If duplicate keys are encountered only the item associated with the ‘latest’ occurrence of the duplicated key is preserved, earlier occurrences being discarded. The need for such an algorithm is most obvious in the case of on-line record editing in a time-sharing environment where most of the records or sentences will have been entered correctly, but occasionally there will be a replacement of an old record or the insertion of new ones into already entered text. This algorithm first constructs a table with one entry in the table for each part of the source text that is internally ordered. It then performs an N-way merge of the parts.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.