One Pass at a Time
Computing · Page 1 of 2
Name
Date
DIRECTIONS: Start at the left. Wrong way round? Swap the two. Move along one. Keep going to the end: that is one pass.
Write the row after each pass, and its number of swaps. Stop when a pass has no swaps.
How You Know It Stopped
Computing · Page 2 of 2
DIRECTIONS: Look back at your passes and answer these.
| Question | Your answer |
| How many passes did you need before one had no swaps? | |
| How many swaps did you make on the very first pass? | |
| How many on the last pass that still had some? | |
| Did the number of swaps ever go up from one pass to the next? | |
The swaps never go up, and they run out. So this method always finishes.
Now 1 2 3 4 5 6. Do one pass.
How many swaps? So how many passes did the whole thing take?