New answers tagged sorting
1
vote
How AlphaDev improved sorting algorithms?
As written in other answers, the contributions of AlphaDev are:
A branch-less implementation of sort for short vectors (from which most of the speedup over std::sort comes)
A reduction in the number ...
0
votes
Sorting an array of length $n$ with $k$ distinct elements
Create an AVL tree with nodes containing unique integers as keys and their respective counts
then simply do inorder traversal
Since there are k distinct integers , the height of tree will grow upto ...
Top 50 recent answers are included
Related Tags
sorting × 908algorithms × 530
algorithm-analysis × 158
time-complexity × 103
runtime-analysis × 92
quicksort × 73
arrays × 67
data-structures × 55
complexity-theory × 51
lower-bounds × 34
radix-sort × 32
efficiency × 30
mergesort × 28
asymptotics × 25
optimization × 23
graphs × 21
heaps × 21
comparison × 20
search-algorithms × 17
permutations × 17
randomized-algorithms × 16
reference-request × 15
strings × 13
correctness-proof × 13
greedy-algorithms × 11