Practice30Create account

A word-and-number arrangement machine, when given an input line of words and numbers, rearranges it in steps, and this machine makes the line shorter as it works. In each step the smallest number still in the line is struck out altogether, and the elements on either side of it close up. Words are never struck out, and the machine stops when only words are left in the line.
Input: jacket 58 shirt 23 scarf 46 tabla 31.
Which of the following is Step 2 of the above arrangement?

Competition practiceInput-Output
  • Ajacket 58 shirt scarf 46 tabla 31
  • Bjacket 58 shirt scarf 46 tabla
  • Cjacket 58 shirt scarf tabla
  • Djacket shirt 23 scarf tabla 31

Step-by-Step Solution

Step 1 strikes out 23, the smallest number: jacket 58 shirt scarf 46 tabla 31. Step 2 strikes out 31, now the smallest: jacket 58 shirt scarf 46 tabla, the answer. "jacket 58 shirt scarf 46 tabla 31" is Step 1 and "jacket 58 shirt scarf tabla" is Step 3, the off-by-one lines. "jacket shirt 23 scarf tabla 31" strikes out the largest number each time (58, then 46) instead of the smallest.
Answer: B) jacket 58 shirt scarf 46 tabla

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