Practice30Create account

A word-and-number arrangement machine, when given an input line of words and numbers, rearranges it in steps. Only the second letter of a word matters to this machine. In each step it looks over the words still waiting, picks the one whose second letter stands nearest the beginning of the alphabet, and moves that word to the extreme right end of the line. Should two waiting words carry the same second letter, whichever of them stood nearer the right-hand end of the input goes first. Nothing else changes place, and the machine halts when no word is left waiting.
Input: 63 pine 27 marble 84 quiver 15.
In Step 2 of the above arrangement, which element stands immediately to the left of "quiver"?

Competition practiceInput-Output
  • A15
  • B84
  • C27
  • Dmarble

Step-by-Step Solution

Second letters: marble gives a, pine gives i, quiver gives u, so the order of shifting is marble, pine, quiver. Step 1: 63 pine 27 84 quiver 15 marble. Step 2: 63 27 84 quiver 15 marble pine. Quiver is preceded immediately by 84. The number 15 stands immediately to its right, not its left; 27 is one place further back; and marble has already been carried to the finished block behind it.
Answer: B) 84

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, when given an input line of words and numbers,…A word-and-number arrangement machine, when given an input line of words and numbers,…A word-and-number arrangement machine, when given an input line of words and numbers,…A word-and-number arrangement machine, when given an input line of words and numbers,…A word-and-number arrangement machine, when given an input line of words and numbers,…