Practice30Create account

A word-arranging machine, in each step, moves the word that comes first in alphabetical order to the leftmost unplaced position. Example — Input: mango cherry apple lemon banana; Step I: apple mango cherry lemon banana; Step II: apple banana mango cherry lemon. For the same input, what is Step III?

Competition practiceInput-Output
  • Aapple banana cherry mango lemon
  • Bapple cherry banana mango lemon
  • Capple banana cherry lemon mango
  • Dapple banana mango cherry lemon

Step-by-Step Solution

After Step II (apple banana mango cherry lemon) the next alphabetical word among mango, cherry, lemon is cherry; placing it third gives apple banana cherry mango lemon.
Answer: A) apple banana cherry mango lemon

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 rearranging machine, in each step, moves the first element of the row to the end.…A rearranging machine, in each step, moves the last element of the row to the front.…A number-arranging machine, in each step, moves the largest not-yet-placed number to the…A word-arranging machine rearranges an input line one step at a time. Example — Input:…A number-arranging machine rearranges an input line one step at a time. Example — Input:…