Practice30Create account

A machine rearranges a line of numbers; in each step it moves the largest number not yet fixed to the leftmost unfixed position, which then becomes fixed. Input: 15 8 40 22 31. Step I: 40 15 8 22 31. Step II: 40 31 15 8 22. What is Step III?

Competition practiceInput-Output
  • A40 31 22 15 8
  • B40 31 22 8 15
  • C40 31 15 22 8
  • D40 22 31 15 8

Step-by-Step Solution

Positions 1 and 2 are fixed as 40 and 31. Among 15, 8 and 22 the largest is 22, which moves to the third position, giving 40 31 22 15 8.
Answer: A) 40 31 22 15 8

Master this topic in 30 minutes a day.

Don't just memorise the answer — build a daily practice habit.

Practice 5 Similar Questions Free →

All Input-Output practice questions

More Input-Output practice

A machine rearranges words; in each step it moves the word that comes earliest in…A machine rearranges words; in each step it moves the word that comes last in dictionary…A machine rearranges numbers; in each step the smallest number not yet fixed moves to…A machine shifts a line of numbers; in each step the number at the left end moves to the…A word-rearranging machine moves one word per step: in each step the next word in…