Practice30Create account

A word-and-number arrangement machine rearranges any input line in steps. In each step two shifts happen together: the smallest number that has not already been shifted in an earlier step is taken out and placed at the extreme right end of the line, and at the same time the word that comes first in alphabetical order among the words not already 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: gate 38 74 hive iron 21 96 jute.
Which of the following is Step 2 of the above arrangement?

Competition practiceInput-Output
  • Ahive gate 74 iron 96 jute 21 38
  • Biron hive gate 96 jute 21 38 74
  • Cgate 38 74 hive iron 96 jute 21
  • Diron jute gate 38 hive 21 96 74

Step-by-Step Solution

Work the machine forward from the input. Step 1: gate 38 74 hive iron 96 jute 21. Step 2: hive gate 74 iron 96 jute 21 38. Hence the line shown is Step 2.
Answer: A) hive gate 74 iron 96 jute 21 38

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, alternating…A word-and-number arrangement machine rearranges any input line in steps, alternating…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…