Practice30Create account

A word-arranging machine rearranges an input line of words in steps. In each step it moves the alphabetically earliest of the not-yet-arranged words to the front, keeping the arranged words at the left in alphabetical order while the remaining words stay in their original order. Input: cat apple dog bear egg. What is Step 1 of the output?

Competition practiceInput-Output
  • Acat apple dog bear egg
  • Bapple cat dog bear egg
  • Capple bear cat dog egg
  • Dapple bear cat egg dog

Step-by-Step Solution

The alphabetically earliest word 'apple' moves to the front while the rest keep their order, giving apple cat dog bear egg.
Answer: B) apple cat dog bear 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-arranging machine rearranges an input line of words in steps. In each step it…A word-arrangement machine, in each step, shifts the alphabetically-earliest…A number-arrangement machine, in each step, shifts the smallest not-yet-placed number to…A word-arrangement machine, in each step, shifts the alphabetically-earliest…A number-arrangement machine, in each step, shifts the largest not-yet-placed number to…