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 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. In every even-numbered step (Step 2, 4, 6, ...) 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 right end of the line. All the remaining elements keep their relative order, and the machine stops when no further shift is possible.
Input: torch 24 urn 78 vase 45 wheel 13.
Which of the following is Step 3 of the above arrangement?

Competition practiceInput-Output
  • A45 78 24 vase wheel 13 torch urn
  • B45 78 24 urn vase wheel 13 torch
  • C78 24 urn vase 45 wheel 13 torch
  • D24 13 torch urn 78 vase 45 wheel

Step-by-Step Solution

Work the machine forward from the input. Step 1: 78 torch 24 urn vase 45 wheel 13. Step 2: 78 24 urn vase 45 wheel 13 torch. Step 3: 45 78 24 urn vase wheel 13 torch. Hence the line shown is Step 3.
Answer: B) 45 78 24 urn vase wheel 13 torch

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, 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…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…