Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sorting]

Sorting is the process of arranging similar items according to a predefined order.

1
vote
0answers
49 views

Maintain sorted ring buffer [closed]

I would like to insert elements into a ring (circular) buffer one at a time and maintain a permutation array which keeps track of the sorted elements in ascending order. To do this, I have adapted the ...
0
votes
1answer
52 views

LAPACK zlapmt_ freezes code [closed]

I'm using LAPACK's zggev_ routine to solve some generalized eigenvalue problem. While it produces the correct results, I want the eigenvalues and according eigenvectors sorted by absolute value. For ...
1
vote
0answers
37 views

An algorithm to turn descending order into ascending order, but why correct? [closed]

I wonder why does this algorithm below work well? Many appreciates! Task: Suppose all elements in an array with length $n = 2^m$ are in descending order: $a_1 > a_2 > ... > a_n$, we need to ...
1
vote
1answer
212 views

extract exhaustive mutually exclusive intervals from larger set of intervals [closed]

I have a collection of time intervals with integer valued endpoints , e.g. (1,2), (2, 6) (5,6), and the number of events falling in each time interval, and I would like to determine if from them I ...
0
votes
2answers
513 views

Fastest multithreaded radix sort

What is the fastest multithreaded radix sort code out there? I am using radix sort to sort the Morton/Hilbert keys when constructing a tree structure. The number of identical keys is in the range of ...
1
vote
1answer
427 views

Sorting eigenvalues by the dominant contribution

[Edited to simplify the question] I am trying to associate the eigenvalues $E$ of a matrix $H$ to the original rows of the matrix. Moreover, it would be trivial to sort the eigenvalues in ascending ...
4
votes
1answer
94 views

Is it possible to compute quantiles of a set of numbers, without first sorting those numbers?

I apologize in advances if this is the wrong place to be asking this question, (I had considered putting it on CV first). I am studying financial (S&P, Dow Jones, etc) data, and would like to ...
2
votes
2answers
248 views

Quicksort - difference in time

I'm testing Quicksort based on Niklaus Wirth algorithm. I'm checking how much time I need to sort an array. There is interesting thing that for an array consisting elements in these sequence: 1 3 ...