Practice30Create account

A word-and-number arrangement machine rearranges any input line in steps. In each step 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: 57 92 ash birch 16 cane 63 deer 48 elk.
Which of the following is Step 2 of the above arrangement?

Competition practiceInput-Output
  • Acane birch ash 57 92 16 63 deer 48 elk
  • Bash 57 92 birch 16 cane 63 deer 48 elk
  • Cdeer elk 57 92 ash birch 16 cane 63 48
  • Dbirch ash 57 92 16 cane 63 deer 48 elk

Step-by-Step Solution

Work the machine forward from the input. Step 1: ash 57 92 birch 16 cane 63 deer 48 elk. Step 2: birch ash 57 92 16 cane 63 deer 48 elk. Hence the line shown is Step 2.
Answer: D) birch ash 57 92 16 cane 63 deer 48 elk

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