| Start |
|---|
| Odd-Even Sort Basic Information An Odd-Even Sort (opens new window) or brick sort is a simple sorting algorithm, which is developed for use on parallel processors with local interconnection. It works by comparing all odd/even indexed pairs of adjacent elements in the list and, if a pair is in the wrong order the elements are switched. The next step repeats this for even/odd indexed pairs. Then it alternates between odd/even and even/odd steps until the list is sorted. Pseudo code for Odd-Even Sort: Wikipedia has best illustration of Odd-Even sort: Example of Odd-Even Sort: Implementation: I used C# language to implement Odd-Even Sort Algorithm. Auxiliary Space: |
Read Article
https://develop.horje.com/learn/1434/reference