· Separate into sublists using INT(n/2) this gives the number of lists to be used
· Pair up the first number in the first half with the first number in the second half, second with second etc. but keeping the order the same.[write each pair on separate lines diagonally so order can be seen.]
· Compare the pairs and shuttle sort them to get the larger number at the back.
· Merge/re-piece the list but with the numbers that have been swapped in their new positions.
· Quarter the list and do the same with each sublist.
· Repeat until each sublist only has 1 number.
[As you will only need to write out the sublists, and then the merges the guy won’t know how you sorted the sublists etc. Write out comparisons and swaps at each stage.]
Comments
No comments have yet been made