Pesquisa · Mapa mental

Batcher odd–even mergesort

Batcher's odd–even mergesort is a generic construction devised by Ken Batcher for sorting networks of size O(n (log n)2) and depth O((log n)2), where n is the number of items to be sorted. Although it is not asymptotically optimal, Knuth concluded in 1998, with respect to the AKS network that "Batcher's method is much better, unless n exceeds the total memory capacity of all computers on earth!"

Fonte: Wikipedia (en)Atualizado em 17/10/2026
01

Pseudocode

Imagem: Octotron · BY-SA · Openverse

Various recursive and iterative schemes are possible to calculate the indices of the elements to be compared and sorted. This is one iterative technique to generate the indices for sorting n elements: Non-recursive calculation of the partner node index is also possible.

Vídeos recomendados

Fontes consultadas

Continue pesquisando