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. How many steps are required to complete the arrangement (all words in alphabetical order)?

Competition practiceInput-Output
  • AThree
  • BFour
  • CFive
  • DTwo

Step-by-Step Solution

Steps place apple, fig, grape, then mango (leaving orange last), reaching apple fig grape mango orange after four steps.
Answer: B) 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-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…A word-and-number arranging machine rearranges an input line step by step. In each step…