Practice30Create account

A word-and-number arranging machine, when given an input line, rearranges it step by step. In each step it moves the largest of the not-yet-arranged numbers to the left, building a descending block of numbers on the left, while the words keep their original relative order. For the input 'book 34 cat 91 dam 27 ear 68', how many steps are needed to complete the arrangement?

Competition practiceInput-Output
  • AThree
  • BFive
  • CSix
  • DFour

Step-by-Step Solution

There are four numbers (91, 68, 34, 27); one is placed to the left per step, so the arrangement is completed in 4 steps (final: 91 68 34 27 book cat dam ear).
Answer: D) Four

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 arranging machine, in each step, moves the largest of the…A word-and-number arranging machine, in each step, moves the largest of the…A number-arranging machine rearranges a line of numbers step by step. In each step it…A number-arranging machine rearranges a line of numbers step by step. In each step it…A word-and-number arrangement machine rearranges an input line in steps. In each step…