Sort the given list by performing adjacent ordering operation using bubble and reset to select the pairs.
The Bubble Machine has two controls: Bubble and Reset. It also has a state variable i, which keeps track of which two elements to compare. Pressing the Bubble button increment i. It also orders the elements if they are out of order, otherwise it leaves them unchanged. The Reset control takes the current index back to 0.
Follow the given steps to perform the experiment.