Odd-Even Merge Sort

Batcher's classic merging algorithm

Batcher's odd-even merge sort divides elements into odd and even indexed groups, recursively sorts them, then merges using an odd-even merge network. It has the same asymptotic complexity as bitonic sort but with a different structure.

Properties

PropertyValue
Depth (stages)O(log2 n)
ComparatorsO(n log2 n)
ParallelismUp to n/2 comparisons per stage
Best forPower-of-2 sizes, understanding merging
View on GitHub

Resources