15

Sorting numbers

nSort n integers in
increasing order.

nCreate **n **chares, each
keeping one number.

nIn every nIn every **even iteration**
chares 2i swaps with chare 2i-1 if required.

nAfter each iteration all
chares report to the mainchare. After everybody reports mainchares signals next iteration. Sorting
completes in