Practice30Create account

A rearrangement machine, given an input line, arranges all words in alphabetical order from the left (one word per step) and then arranges the numbers in ascending order (one number per step). Input: 34 sun 21 bat 56 owl. Step I: bat 34 sun 21 56 owl. Step II: bat owl 34 sun 21 56. Step III: bat owl sun 34 21 56. Step IV: bat owl sun 21 34 56. Which is the last step of this rearrangement?

Competition practiceInput-Output
  • AStep III
  • BStep V
  • CStep VI
  • DStep IV

Step-by-Step Solution

After Step IV the line reads 'bat owl sun 21 34 56' — words alphabetical and numbers ascending — which is fully sorted, so no further step is possible. Step IV is the last step.
Answer: D) Step IV

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 rearrangement machine moves, in each step, the smallest number not yet in place to the…A word-and-number arrangement machine rearranges an input line one step at a time.…A word-and-number rearrangement machine, given an input line, rearranges it step by…A word-and-number arrangement machine, when given an input line, rearranges it step by…A word-and-number arrangement machine, when given an input line, rearranges it step by…