Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

THE NEW SCIENCE: ALGORITHM

AKIRA KOBASHI

Assume we are going to sort the following series.


5, 1, 3, 4, 2
See the left 2 elements, 5 and 1:
1, 5, 3, 4, 2
Then see the right 2 elements, 4 and 2:
1, 5, 3, 2, 4
Next, see the left 5 and 3 after you confirm the left 1 and 5 were sorted:
1, 3, 5, 2, 4
Then see the right 5 and 2 after you confirm the right 2 and 4 were sorted:
1, 3, 2, 5, 4
After that, see the left 3 and 2 after you confirm the left 1 and 3 were sorted:
1, 2, 3, 5, 4
Finally, see the right 5 and 4:
1, 2, 3, 4, 5
My experiment says this is much faster than bubble sort. I need to keep doing
my experiment.

Date: January 3, 2015.


1

You might also like