Practice30Create account

A word-arrangement machine, given an input row of words, rearranges it in steps. In each step the word that comes earliest in alphabetical order among the words not yet placed is shifted to the leftmost open position, and the remaining words keep their relative order. Input: mango apple orange grape fig. Step I: apple mango orange grape fig. What will Step II be?

Competition practiceInput-Output
  • Aapple fig grape mango orange
  • Bapple mango fig orange grape
  • Capple grape fig mango orange
  • Dapple fig mango orange grape

Step-by-Step Solution

After Step I, 'apple' is placed. The next alphabetically is 'fig', which moves to the 2nd position while mango, orange, grape keep order: apple fig mango orange grape.
Answer: D) apple fig mango orange grape

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-arrangement machine, given an input row of words, rearranges it in steps. In each…A number-arranging machine rearranges a set of numbers. In each step it fixes one more…A word-and-number arrangement machine rearranges a given input line in successive steps.…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…