This algorithm was primarily designed with parallel machine in mind, because directly running bubble sort on parallel machine doesn't make sense, as bubble sort is sequential sorting algorithm, we can't simply divide works in different cpus. So, we have to modify this algorithm such a way that we can have sorting task run in parallal cpus, and as a result we get odd even sort.
This algorithm has 2 phases,
Odd phase
Even phase
Imagine we have array of n unsorted numbers,
Odd phase
In odd phase, numbers at odd index will be compared to their previous element (if exist)
So, here (index 1 and index 0) will be compared along with (index 3 and index 2) and so on...
and they will be swapped if based on comparision result just like bubble sort.
Even phase
In even phase, numbers at even index will be compared to their previous element (if exist)
So, here (index 2 and index 1) will be compared along with (index 4 and index 3) and so on...
and they will be swapped if based on comparision result just like bubble sort.
Use this interactive animation to understand it better...
Go ahead, enter a list of numbers separated by commas,
( This animation mimics parallel behaviour )
Why this can be used for parallel machine is probably understood by animation, as we can see that now comparisons of numbers in one phase can be done simultaneously and it swap numbers without affecting further sequence of algorithm unlike bubble sort.