DEV Community

Discussion on: Common Sorting Algorithms in JavaScript

Collapse
 
realdolos profile image
Dolores Greatamsky

The merge step of MergeSort comes in handy when needing to merge any number of already sorted sequences into one sorted sequence. I recently used it to merge hundreds of "sorted string table"-style files into one larger file, where the result wouldn't have fit in main memory. Remembering about MergeSort really helped me there 😁

Collapse
 
christinamcmahon profile image
Christina

Wow, that's a really cool use of the merge process, good thinking!