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: 35 lake 68 mist 79 nook 22 opal 51 pike.
Which of the following is Step 3 of the above arrangement?

Competition practiceInput-Output
  • A51 68 79 35 lake mist nook 22 opal pike
  • B35 51 68 79 lake mist nook 22 opal pike
  • C68 79 35 lake mist nook 22 opal 51 pike
  • D51 35 22 lake 68 mist 79 nook opal pike

Step-by-Step Solution

Work the machine forward from the input. Step 1: 79 35 lake 68 mist nook 22 opal 51 pike. Step 2: 68 79 35 lake mist nook 22 opal 51 pike. Step 3: 51 68 79 35 lake mist nook 22 opal pike. Hence the line shown is Step 3.
Answer: A) 51 68 79 35 lake mist nook 22 opal pike

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…