Algorithm bubbleSort (list, 'last)
Sort an array using* .bubble sort. Adjacent
elements, are compared gad exchanged until list is completely ordered.
pre list mast contain at least one item
last contains index to last element in the list
Post list has been rearranged in sequence low to high
1 set current to 0
2 set sorted to false
3 loop (current current)
1 if (walker data < walker - 1 data)
Any exchange means list is not sorted.
1 set sorted to false
2 exchange- (list, walker, walker - 1}
2 end if
3 decrement walker
4 end loop
5 increment current '
4 end loop
end bubbleSort