1.
Given the following list of numbers:
[5, 16, 20, 12, 3, 8, 9, 17, 19, 7]
Which answer illustrates the contents of the list after all swapping is complete for a gap size of 3?
- [5, 3, 8, 7, 16, 19, 9, 17, 20, 12]
- Each group of numbers represented by index positions 3 apart are sorted correctly.
- [3, 7, 5, 8, 9, 12, 19, 16, 20, 17]
- This solution is for a gap size of two.
- [3, 5, 7, 8, 9, 12, 16, 17, 19, 20]
- This is list completely sorted, you have gone too far.
- [5, 16, 20, 3, 8, 12, 9, 17, 20, 7]
- The gap size of three indicates that the group represented by every third number e.g. 0, 3, 6, 9 and 1, 4, 7 and 2, 5, 8 are sorted not groups of 3.