Practice30Create account

A machine rearranges an input by alternating rules: Step I moves the alphabetically earliest word to the left end, Step II moves the largest number to the right end, and so on. Example — Input: 24 lion 56 tiger 13; Step I: lion 24 56 tiger 13; Step II: lion 24 tiger 13 56. For the input '35 wolf 18 bear 42 fox', what is Step II?

Competition practiceInput-Output
  • Abear 35 wolf 18 42 fox
  • Bbear 35 wolf 18 fox 42
  • Cbear 35 wolf fox 18 42
  • Dbear 42 35 wolf 18 fox

Step-by-Step Solution

Step I moves the earliest word 'bear' to the left: bear 35 wolf 18 42 fox. Step II moves the largest number 42 to the right end: bear 35 wolf 18 fox 42.
Answer: B) bear 35 wolf 18 fox 42

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 rearranges an input in steps by moving the alphabetically…A number-arrangement machine rearranges an input in steps by moving the smallest…A number-arranging machine moves the largest remaining number to the front at each step.…A word-arranging machine moves words to the left in alphabetical order, one per step.…A number-arranging machine moves the smallest remaining number to the right end at each…