Sorting Lists with Equal Keys Using Mergesort in Linear Time
Albert Tedja

TL;DR
This paper presents an optimized mergesort algorithm that sorts sequences with many equal keys in linear time by grouping equal elements, improving efficiency especially when the number of distinct keys is small.
Contribution
The paper introduces a novel optimization for mergesort that achieves linear time complexity for sequences with many equal keys by grouping elements during sorting.
Findings
Achieves $O(n \, log_2 k)$ sorting time for sequences with $k$ distinct keys.
When $k$ is constant, mergesort can operate in linear time using linked lists.
Optimization effectively groups equal elements to reduce comparison overhead.
Abstract
This article introduces a new optimization method to improve mergesort's runtime complexity, when sorting sequences that have equal keys to , where is the number of distinct keys in the sequence. When 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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsCryptography and Data Security · Data Quality and Management · Machine Learning and Algorithms
