Worksheet 7
Worksheet 7
Odd-Even Sort
1. Perform an Odd-Even Sort on the following array, manually.
+---+---+---+---+---+---+---+---+
| 9 | 7 | 2 | 1 | 3 | -1| 8 | 5 |
+---+---+---+---+---+---+---+---+
2. Divide the following array in half, sort each half, then merge the two halves.
+---+---+---+---+---+---+---+---+
| 9 | 7 | 2 | 1 | 3 | -1| 8 | 5 |
+---+---+---+---+---+---+---+---+