English
Related papers

Related papers: Insertion Sort is O(n log n)

200 papers

Buffer insertion is a popular technique to reduce the interconnect delay. The classic buffer insertion algorithm of van Ginneken has time complexity O(n^2), where n is the number of buffer positions. Lillis, Cheng and Lin extended van…

Hardware Architecture · Computer Science 2011-11-09 Zhuo Li , Weiping Shi

We show that any permutation of ${1,2,...,N}$ can be written as the product of two involutions. As a consequence, any permutation of the elements of an array can be performed in-place in parallel in time O(1). In the case where the…

Data Structures and Algorithms · Computer Science 2015-03-20 Qingxuan Yang , John Ellis , Khalegh Mamakani , Frank Ruskey

A novel integer value-sorting technique is proposed replacing bucket sort, distribution counting sort and address calculation sort family of algorithms. It requires only constant amount of additional memory. The technique is inspired from…

Data Structures and Algorithms · Computer Science 2012-11-02 A. Emre Cetin

The task of finding an entry in an unsorted list of $N$ elements famously takes $O(N)$ queries to an oracle for a classical computer and $O(\sqrt{N})$ queries for a quantum computer using Grover's algorithm. Reformulated as a spatial search…

Quantum Physics · Physics 2022-01-04 Thomas G. Wong

We study sorting algorithms based on randomized round-robin comparisons. Specifically, we study Spin-the-bottle sort, where comparisons are unrestricted, and Annealing sort, where comparisons are restricted to a distance bounded by a…

Data Structures and Algorithms · Computer Science 2015-03-17 Michael T. Goodrich

Lattice data structures are space efficient and cache-suitable data structures. The basic searching, insertion, and deletion operations are of time complexity $O(\sqrt{N})$. We give a jump searching algorithm of time complexity…

Data Structures and Algorithms · Computer Science 2016-05-16 Mohammad Obiedat

In this paper we propose a variant of the induced suffix sorting algorithm by Nong (TOIS, 2013) that computes simultaneously the Lyndon array and the suffix array of a text in $O(n)$ time using $\sigma + O(1)$ words of working space, where…

Data Structures and Algorithms · Computer Science 2020-09-10 Felipe A. Louza , Sabrina Mantaci , Giovanni Manzini , Marinella Sciortino , Guilherme P. Telles

The order-preserving model (op-model, in short) was introduced quite recently but has already attracted significant attention because of its applications in data analysis. We introduce several types of periods in this setting (op-periods).…

Data Structures and Algorithms · Computer Science 2018-01-08 Garance Gourdel , Tomasz Kociumaka , Jakub Radoszewski , Wojciech Rytter , Arseny Shur , Tomasz Waleń

TimSort is an intriguing sorting algorithm designed in 2002 for Python, whose worst-case complexity was announced, but not proved until our recent preprint. In fact, there are two slightly different versions of TimSort that are currently…

Data Structures and Algorithms · Computer Science 2019-07-09 Nicolas Auger , Vincent Jugé , Cyril Nicaud , Carine Pivoteau

Generalized sorting problem, also known as sorting with forbidden comparisons, was first introduced by Huang et al. together with a randomized algorithm which requires $\tilde O(n^{3/2})$ probes. We study this problem with additional…

Data Structures and Algorithms · Computer Science 2020-11-03 Pinyan Lu , Xuandi Ren , Enze Sun , Yubo Zhang

We consider the two-dimensional sorted range reporting problem. Our data structure requires O(n lglg n) words of space and O(lglg n + k lglg n) query time, where k is the number of points in the query range. This data structure improves a…

Data Structures and Algorithms · Computer Science 2013-08-16 Gelin Zhou

Many search engines such as Google, Bing & Yahoo! show search suggestions when users enter search phrases on their interfaces. These suggestions are meant to assist the user in finding what she wants quickly and also suggesting common…

Data Structures and Algorithms · Computer Science 2021-11-01 Dhruv Matani

Given an array A[1: n] of n elements drawn from an ordered set, the sorted range selection problem is to build a data structure that can be used to answer the following type of queries efficiently: Given a pair of indices i, j $ (1\le i\le…

Data Structures and Algorithms · Computer Science 2025-04-22 Waseem Akram , Sanjeev Saxena

We describe and analyze Zig-zag Sort--a deterministic data-oblivious sorting algorithm running in O(n log n) time that is arguably simpler than previously known algorithms with similar properties, which are based on the AKS sorting network.…

Data Structures and Algorithms · Computer Science 2014-05-19 Michael T. Goodrich

Sorting is one of the most used and well investigated algorithmic problem [1]. Traditional postulation supposes the sorting data archived, and the elementary operation as comparisons of two numbers. In a view of appearance of new processors…

Data Structures and Algorithms · Computer Science 2011-07-22 Hakob Aslanyan

In Gapped String Indexing, the goal is to compactly represent a string $S$ of length $n$ such that for any query consisting of two strings $P_1$ and $P_2$, called patterns, and an integer interval $[\alpha, \beta]$, called gap range, we can…

Data Structures and Algorithms · Computer Science 2024-03-06 Philip Bille , Inge Li Gørtz , Moshe Lewenstein , Solon P. Pissis , Eva Rotenberg , Teresa Anna Steiner

Most hash tables have an insertion time of $O(1)$, possibly qualified as expected and/or amortised. While insertions into cuckoo hash tables indeed seem to take $O(1)$ expected time in practice, only polylogarithmic guarantees are proven in…

Data Structures and Algorithms · Computer Science 2022-04-26 Stefan Walzer

Neighborhood graphs are gaining popularity as a concise data representation in machine learning. However, naive graph construction by pairwise distance calculation takes $O(n^2)$ runtime for $n$ data points and this is prohibitively slow…

Data Structures and Algorithms · Computer Science 2009-04-22 Takeaki Uno , Masashi Sugiyama , Koji Tsuda

The classic string indexing problem is to preprocess a string S into a compact data structure that supports efficient pattern matching queries. Typical queries include existential queries (decide if the pattern occurs in S), reporting…

Data Structures and Algorithms · Computer Science 2021-02-05 Philip Bille , Inge Li Gørtz , Max Rishøj Pedersen , Teresa Anna Steiner

Mergesort is one of the few efficient sorting algorithms and, despite being the oldest one, often still the method of choice today. In contrast to some alternative algorithms, it always runs efficiently using O(n log n) element comparisons…

Data Structures and Algorithms · Computer Science 2025-09-30 Christian Siebert