Algorithm Comparison

Compare algorithmic efficiency and operation counts side-by-side.

Competitor A
Competitor B

Live Statistics

Metric
3-Way Quick Sort
Batcher Odd-Even Merge Sort
Total Operations
-
-
Current Step
0
0
Progress
0%
0%

3-Way Quick Sort

Dutch national flag partitioning groups all pivot-equal values in one pass. Recursion skips the equal group, which helps duplicate-heavy inputs.

Steps

  • Choose a pivot from the current range.
  • Keep three regions: smaller, equal, and larger values.
  • Recurse only on the smaller and larger regions.

Batcher Odd-Even Merge Sort

Uses Batcher’s odd-even merge network to sort power-of-two wires.

Steps

  • Sort two halves with the same network.
  • Merge alternating subsequences recursively.
  • Compare neighboring wires at each merge stage.