Practice30Create account

A word-and-number arranging machine rearranges an input line step by step. In each step it shifts the alphabetically-earliest word that is not yet arranged to the left (placing it just after any words already arranged) and shifts the lowest number not yet arranged to the right (just before any numbers already arranged); the other elements keep their relative order. Input: cow 45 bat 12 dog 78 ant 30. What is Step 2 of the arrangement?

Competition practiceInput-Output
  • Aant cow 45 bat dog 78 30 12
  • Bant bat cow 45 dog 78 30 12
  • Cant bat 45 cow dog 78 30 12
  • Dant bat cow dog 78 45 30 12

Step-by-Step Solution

Step 1: ant cow 45 bat dog 78 30 12. Step 2: bat moves next to ant and 30 moves left of 12, giving 'ant bat cow 45 dog 78 30 12'.
Answer: B) ant bat cow 45 dog 78 30 12

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 rearranges an input line step by step. In each step…A word-and-number arranging machine rearranges an input line step by step. In each step…A word-and-number arranging machine rearranges an input line step by step. In each step…Statements: No dependable machine is cheap. Some of the machines in this workshop are…A word-and-number arrangement machine rearranges any input line in steps. In each step…