Practice30Create account

A word-arrangement machine, when given a line of words, rearranges them step by step. In each step it moves the word that is alphabetically earliest among the words not yet placed to the next free position from the left; the remaining words keep their order. Input: orange fig mango apple grape. What is the arrangement after Step II?

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

Step-by-Step Solution

Step I fixes apple; in Step II the next earliest word 'fig' moves to position 2, giving apple fig orange mango grape.
Answer: B) apple fig orange mango 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, when given a line of words, rearranges them step by step. In…A word-arrangement machine, when given a line of words, rearranges them step by step. In…A word-and-number arranging machine rearranges an input line step by step. In each step…A word-and-number arranging machine rearranges an input line step by step. In each step…A word-and-number arranging machine rearranges an input line step by step. In each step…