Practice30Create account

A word-and-number arrangement machine rearranges a given input line in successive steps.
Input: tree 34 apple 12 sky 56 nine 8
Step I: apple tree 34 12 sky 56 nine 8
Step II: apple 8 tree 34 12 sky 56 nine
Step III: apple 8 nine tree 34 12 sky 56
and so on until no more rearrangement is possible.
What will Step IV be?

Competition practiceInput-Output
  • Aapple 8 nine 12 tree sky 34 56
  • Bapple 8 nine 12 sky tree 34 56
  • Capple 8 nine 12 tree 34 sky 56
  • Dapple 8 nine tree 12 34 sky 56

Step-by-Step Solution

The machine alternately brings the next word in alphabetical order and then the next-smallest number to the front. Step III placed 'nine'; Step IV brings the next-smallest number, 12, just after it: apple 8 nine 12 tree 34 sky 56.
Answer: C) apple 8 nine 12 tree 34 sky 56

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 rearranging machine, given an input line, produces output in steps. In…A word-and-number rearranging machine, given an input line, produces output in steps. In…A word-and-number rearranging machine, given an input line, produces output in steps. In…A machine rearranges an input line of words and numbers using a fixed rule, one element…A number-arranging machine rearranges an input line of numbers using one rule at each…