 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
n |
Make a pass
through the list
|
|
|
|
comparing pairs
of adjacent
|
|
|
elements.
|
|
|
n |
If the pair is
not properly ordered,
|
|
|
|
interchange them.
|
|
|
n |
At the end of
the first pass, the last
|
|
element will be
in its proper place.
|
|
|
n |
Continue making
passes through
|
|
|
the list until
all the elements are in
|
|
|
place.
|
|