Order Adjacent Machine

Objective

Sort the given list by ordering adjacent numbers in the list.

Experiment Setup

An Order Adjacent Machine is a specialized version of the Order Machine.

The difference between the Order Machine and the Order Adjacent Machine is that in the Order Machine, you can select any two numbers, whereas in the Order Adjacent Machine, you can only select adjacent numbers.

Procedure

Follow the given steps to perform the experiment.

  1. Select a number (The adjacent pair get selected)
  2. Order the selected numbers
  3. Check if the list is sorted or not. If the list is not sorted, then repeat steps 1 to 3.