Practice30Create account

A rearrangement machine works in steps. In each step it picks the word that comes earliest in dictionary order among the words not yet in place and moves it to the leftmost unarranged position; the displaced words shift one place to the right. Input: rat owl cat dog egg. Step I: cat rat owl dog egg. What is Step II?

Competition practiceInput-Output
  • Acat dog owl rat egg
  • Bcat dog rat owl egg
  • Ccat rat dog owl egg
  • Dcat dog egg rat owl

Step-by-Step Solution

After Step I ('cat' fixed), the earliest remaining word is 'dog'. It moves to position 2, pushing 'rat' and 'owl' right: cat dog rat owl egg.
Answer: B) cat dog rat owl egg

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, given an input line, rearranges it by a fixed…A word-and-number arrangement machine, given an input line, rearranges it by a fixed…A number-arranging machine rearranges an input line of numbers step by step. Example —…A number-arranging machine rearranges an input line of numbers step by step. Example —…A number-arranging machine rearranges an input line of numbers step by step. Example —…