Practice30Create account

A word-arranging machine rearranges an input line one step at a time. Example — Input: 'zebra ant owl fox'; Step I: 'ant zebra owl fox'; Step II: 'ant fox zebra owl'. (Each step moves the next word in alphabetical order into the next position from the left.) For the Input 'peach grape apple mango', what is Step II?

Competition practiceInput-Output
  • Agrape apple peach mango
  • Bapple peach grape mango
  • Capple grape mango peach
  • Dapple grape peach mango

Step-by-Step Solution

Step I moves 'apple' to the front (apple peach grape mango); Step II moves the next alphabetical word 'grape' to the second position: apple grape peach mango.
Answer: D) apple grape peach mango

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-and-number arranging machine, given an input line, produces a final arrangement…A word-and-number arranging machine, given an input line, produces a final arrangement…A word-and-number arranging machine, given an input line, produces a final arrangement…A word-and-number arranging machine, given an input line, produces a final arrangement…A number-arranging machine, in each step, moves the largest of the numbers not yet…