Practice30Create account

A machine rearranges words; in each step it moves the word that comes earliest in dictionary order (among words not yet fixed) to the leftmost unfixed position, which then becomes fixed. Input: mango apple orange banana grape. Step I: apple mango orange banana grape. Step II: apple banana mango orange grape. What is Step III?

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

Step-by-Step Solution

Positions 1 and 2 are fixed as apple and banana. Among mango, orange and grape, 'grape' is earliest in dictionary order, so it moves to the third position, giving apple banana grape mango orange.
Answer: A) apple banana grape mango orange

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 machine rearranges words; in each step it moves the word that comes last in dictionary…A machine rearranges numbers; in each step the smallest number not yet fixed moves to…A machine shifts a line of numbers; in each step the number at the left end moves to the…A word-rearranging machine moves one word per step: in each step the next word in…A number-arranging machine moves one number per step: in each step the smallest number…