Practice30Create account

A word-and-number arrangement machine, when given an input line of words and numbers, rearranges it in steps. In each step the machine takes the leftmost number that it has not already dealt with, replaces that number by the sum of its digits, and places the result at the extreme right end of the line. Words are never moved and never changed, every other element keeps its relative position, and the machine stops once every number of the original line has been dealt with.
Input: 35 opal 68 pine 21 quartz 92.
In Step 3 of the above arrangement, which of the following pairs of elements stand next to each other?

Competition practiceInput-Output
  • Aquartz and 92
  • Bopal and quartz
  • Cpine and 92
  • D8 and 3

Step-by-Step Solution

Digit totals in the order the numbers stand: 35 gives 8, 68 gives 14, 21 gives 3, 92 gives 11. Step 1: opal 68 pine 21 quartz 92 8. Step 2: opal pine 21 quartz 92 8 14. Step 3: opal pine quartz 92 8 14 3. The neighbouring pairs there are opal-pine, pine-quartz, quartz-92, 92-8, 8-14 and 14-3, so quartz and 92 is the pair. Opal and quartz are separated by pine, pine and 92 are separated by quartz, and 8 and 3 have 14 standing between them — 3 has only just arrived at the tail and has not yet been joined by anything.
Answer: A) quartz and 92

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