New answers tagged

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 ...
CodeOptimizer's user avatar
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 ...
Sandeep Chatterjee's user avatar

Top 50 recent answers are included