Sorting Numbers

Alice has 9 numbers and wants to sort them in increasing order: 7,8,2,9,5,1,8,5,3.7, 8, 2, 9, 5, 1, 8, 5, 3. It should be an easy task, but Alice only knows how to sort 6 numbers! Therefore, she does the following:

  • Sort the first 6 numbers to get 1,2,5,7,8,9,8,5,3.{\color{#D61F06}1, 2, 5, 7, 8, 9}, 8, 5, 3.
  • Sort the last 6 numbers to get 1,2,5,3,5,7,8,8,9.1, 2, 5, {\color{#D61F06}3, 5, 7, 8, 8, 9}.
  • Sort the first 6 numbers again to get 1,2,3,5,5,7,8,8,9.{\color{#D61F06}1, 2, 3, 5, 5, 7}, 8, 8, 9.

Finally, it sorts the 9 numbers! Does this method work for any 9 numbers?

×

Problem Loading...

Note Loading...

Set Loading...