English

Sorting Lists with Equal Keys Using Mergesort in Linear Time

Data Structures and Algorithms 2020-12-17 v1

Abstract

This article introduces a new optimization method to improve mergesort's runtime complexity, when sorting sequences that have equal keys to O(nlog2k)O(n log_2 k), where kk is the number of distinct keys in the sequence. When kk is constant, it is evident that mergesort is capable of achieving linear time by utilizing linked lists as its underlying data structure. Mergesort linked list implementations can be optimized by introducing a new mechanism to group elements with equal keys together, thus allowing merge algorithm to achieve linear time.

Keywords

Cite

@article{arxiv.2012.08589,
  title  = {Sorting Lists with Equal Keys Using Mergesort in Linear Time},
  author = {Albert Tedja},
  journal= {arXiv preprint arXiv:2012.08589},
  year   = {2020}
}
R2 v1 2026-06-23T20:59:54.203Z