Practice30Create account

A word-and-number arrangement machine rearranges any input line in steps, alternating between two shifts. In every odd-numbered step (Step 1, 3, 5, ...) 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. In every even-numbered step (Step 2, 4, 6, ...) the word that comes last 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: 59 32 fig gum 88 husk 14 ivy.
Which of the following is Step 4 of the above arrangement?

Competition practiceInput-Output
  • Ahusk ivy fig gum 88 14 32 59
  • Bivy 59 fig gum 88 husk 14 32
  • Cgum fig 32 husk 14 ivy 88 59
  • Dhusk ivy 59 fig gum 88 14 32

Step-by-Step Solution

Work the machine forward from the input. Step 1: 59 32 fig gum 88 husk ivy 14. Step 2: ivy 59 32 fig gum 88 husk 14. Step 3: ivy 59 fig gum 88 husk 14 32. Step 4: husk ivy 59 fig gum 88 14 32. Hence the line shown is Step 4.
Answer: D) husk ivy 59 fig gum 88 14 32

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…