Practice30Create account

A word-arranging machine rearranges an input line one step at a time. Example — Input: 'apple mango cherry banana'; Step I: 'mango apple cherry banana'; Step II: 'mango cherry apple banana'. (Each step moves the next word in reverse-alphabetical order into the next position from the left.) For the Input 'lion tiger bear wolf', what is Step I?

Competition practiceInput-Output
  • Atiger wolf lion bear
  • Bwolf lion tiger bear
  • Cwolf tiger lion bear
  • Dlion tiger bear wolf

Step-by-Step Solution

Reverse-alphabetical order puts 'wolf' first; Step I moves it to the front, leaving the rest in place: wolf lion tiger bear.
Answer: B) wolf lion tiger bear

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 number-arranging machine rearranges an input line one step at a time. Example — Input:…A word-arranging machine rearranges an input line one step at a time. Example — Input:…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…