OddEvenSort implementation