Practice30Create account

A word-and-number arrangement machine rearranges an input line one element per step. Illustration — Input: 34 cat 61 apple 27 dog. Step I: apple 34 cat 61 27 dog. Step II: apple 27 34 cat 61 dog. Step III: apple 27 cat 34 61 dog. Step IV: apple 27 cat 34 dog 61 (last step). The rule places words in alphabetical order and numbers in ascending order, alternately, from the left. For the input '56 tiger 12 lion 89 bear 33 wolf', how many steps are needed to complete the arrangement?

Competition practiceInput-Output
  • ASix
  • BSeven
  • CFive
  • DEight

Step-by-Step Solution

Target: bear 12 lion 33 tiger 56 wolf 89. Steps: I bear→front, II 12, III lion, IV 33, V tiger (56 now already correct in place 6, no step needed), VI wolf. Six steps complete the arrangement.
Answer: A) Six

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 arrangement machine rearranges an input line one element per step.…A word-and-number arrangement machine rearranges an input line one element per step.…A number arrangement machine rearranges a line of numbers by a fixed rule. In each step…A number arrangement machine rearranges a line of numbers by a fixed rule. In each step…A number arrangement machine rearranges a line of numbers by a fixed rule. In each step…