Sequential version of the bitonic sort