Order Machine

Objective

Sort the given list by ordering the numbers in the list. You are free to select any pair of numbers you want to order.

Experiment Setup

The Order Machine is similar to the Swap Machine.

The main difference between the Swap Machine and the Order Machine is that in the Swap Machine, you can swap any two selected numbers, whereas in the Order Machine, you can only swap the numbers if they are out of order.

Procedure

Follow the given steps to perform the experiment.

  1. Select first number
  2. Select second number
  3. Order the selected numbers
  4. Check if the list is sorted or not. If the list is not sorted, then repeat steps 1 to 3.