Practice30Create account

A word-and-number arrangement machine rearranges any input line in steps. In each step the largest number that has not already been shifted in an earlier step is taken out and placed at the extreme left end of the line. All the remaining elements keep their relative order, and the machine stops when no further shift is possible.
Input: 34 tree 91 apple 57 sun 12 nest.
Which of the following is Step 2 of the above arrangement?

Competition practiceInput-Output
  • A57 91 34 tree apple sun 12 nest
  • B34 57 91 tree apple sun 12 nest
  • C91 34 tree apple 57 sun 12 nest
  • D34 12 tree 91 apple 57 sun nest

Step-by-Step Solution

Work the machine forward from the input. Step 1: 91 34 tree apple 57 sun 12 nest. Step 2: 57 91 34 tree apple sun 12 nest. Hence the line shown is Step 2.
Answer: A) 57 91 34 tree apple sun 12 nest

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 word-and-number arrangement machine rearranges any input line in steps. In each step…A word-and-number arrangement machine rearranges any input line in steps. In each step…A word-and-number arrangement machine rearranges any input line in steps. In each step…A word-and-number arrangement machine rearranges any input line in steps. In each step…A word-and-number arrangement machine rearranges any input line in steps. In each step…