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 number whose digits add up to the greatest total, among the numbers not already shifted in an earlier step, is taken out and placed at the extreme left end of the line; if two numbers give the same total, the larger of them is taken first. Every other element keeps its relative position, and the machine stops once every number has been shifted.
Input: marble 84 quiver 17 tunnel 39 dapple 62.
In Step 3 of the above arrangement, which element is fourth from the left end?

Competition practiceInput-Output
  • Amarble
  • Bquiver
  • C84
  • Dtunnel

Step-by-Step Solution

Digit totals: 84 gives 12, 39 gives 12, 17 gives 8, 62 gives 8. Both ties are broken in favour of the larger number, so the order of shifting is 84, 39, 62, 17. Step 1: 84 marble quiver 17 tunnel 39 dapple 62. Step 2: 39 84 marble quiver 17 tunnel dapple 62. Step 3: 62 39 84 marble quiver 17 tunnel dapple — counting from the left, 62, 39, 84, marble, so marble is fourth. Reading Step 2 by mistake gives quiver, reading the last step gives 84, and running the machine to the right end instead of the left would put tunnel there.
Answer: A) marble

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