Max writes some numbers as input and commands a robot to arrange them in descending order. The robot arranges the numbers in three steps and delivers the output as given:
Input: 25 40 36 49 18
Step 1: 49 25 40 36 18
Step 2: 49 40 25 36 18
Step 3: 49 40 36 25 18
Similarly, find in how many steps the robot will be able to deliver the output if the input is given as below:
Input : 72 89 3 13 29 42