# Questions tagged [sorting]

Given a sequence of elements, find a permutation such that the elements are in a certain order.

115 questions
Filter by
Sorted by
Tagged with
989 views

### Expected number of random comparisons needed to sort a list

Consider the task of sorting a list x of size n by repeatedly querying an oracle. The oracle draws, without replacement, a random pair of indices (i, j), with i != j, and returns (i, j) if x[i] < x[...
• 337
79 views

### Linear time in-place stable sort

Surprisingly, linear time in-place stable sort is possible with integer keys of $O(\log n)$ bit length. An algorithm appeared in Radix Sorting With No Extra Space (Franceschini, Muthukrishnan, ...
• 2,362
49 views

### Selecting unique records from a large dataframe with many duplicate records

Suppose we have a dataframe with ~10M rows with ~9M duplicate records. What is the most time efficient way of selecting the unique records from this dataframe? Some sort of sampling algorithm?
45 views

3k views

### Efficient recognition of sequences sortable by transpositions?

While reading the post, Probability of generating a desired permutation by random swaps, by Aaronson, I got interested in restricted sorting problem: If we restrict sorting algorithms to use ...
474 views

### Is it possible to find the median with a linear size sorting network?

Is there a sorting network that makes only $O(n)$ comparisons and finds the median? The AKS sorting network sorts with $O(\log n)$ parallel steps, but here I am only interested in the number of ...
• 13.7k
218 views

### How to Quantify Entropy in a Data Set

I'm currently creating a program in Java to analysis the pathological cases of Quicksort. Namely, the transition of complexity from O(n^2) to O(nlogn) as a data set gets less ordered. Since Quicksort ...
• 191
114 views

• 50.3k