Sorting Lists with Equal Keys Using Mergesort in Linear Time

12/15/2020
by   Albert Tedja, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/12/2020

Uniform Linked Lists Contraction

We present a parallel algorithm (EREW PRAM algorithm) for linked lists c...
research
06/12/2023

RIP Linked List

Linked lists have always been an excellent teaching tool in programming....
research
08/19/2022

Merging Sorted Lists of Similar Strings

Merging T sorted, non-redundant lists containing M elements into a singl...
research
02/17/2023

Triemaps that match

The trie data structure is a good choice for finite maps whose keys are ...
research
03/03/2023

Mapping Wordnets on the Fly with Permanent Sense Keys

Most of the major databases on the semantic web have links to Princeton ...
research
09/04/2018

A class of orders with linear? time sorting algorithm

In this article, we give a precise mathematical meaning to `linear? time...
research
05/21/2018

The Adaptive sampling revisited

The problem of estimating the number n of distinct keys of a large colle...

Please sign up or login with your details

Forgot password? Click here to reset