计算机科学 > 数据结构与算法
[提交于 2020年12月15日]
标题:Sorting Lists with Equal Keys Using Mergesort in Linear Time
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:This article introduces a new optimization method to improve mergesort's runtime complexity, when sorting sequences that have equal keys to $O(n log_2 k)$, where $k$ is the number of distinct keys in the sequence. When $k$ 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.
提交历史
来自:Albert Tedja[v1] 2020年12月15日 星期二 20:00:01 UTC