Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A new sorting algorithm implementation known as Odd-Even #241

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added details about the sort in the readme
SNavleen committed Oct 29, 2018
commit eb051f39363e2579d3623864796fa73c23778452
3 changes: 2 additions & 1 deletion src/algorithms/sorting/odd-even-sort/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Odd-Even Sort

Odd-Even sort
Odd–Even sort (also known as brick sort) is a relatively simple sorting algorithm. Developed originally for use on parallel processors with local interconnections. It is a comparison sort related to bubble sort, with which it shares many characteristics. It functions by comparing all odd/even indexed pairs of adjacent elements in the list and, if a pair is in the wrong order (the first is larger than the second) the elements are switched. The next step repeats this for even/odd indexed pairs (of adjacent elements). Then it alternates between odd/even and even/odd steps until the list is sorted.


![Algorithm Visualization](https://upload.wikimedia.org/wikipedia/commons/1/1b/Odd_even_sort_animation.gif)