Practice30Create account

A word-and-number arranging machine rearranges an input line one step at a time. In each step it moves the word that comes earliest in alphabetical order to the extreme left and the highest number to the extreme right; the other elements keep their order in between (words move only left, numbers only right). Input: cat 15 dog 8 ant 23 bee 42. Which of the following is Step 2?

Competition practiceInput-Output
  • Aant bee cat 15 dog 8 23 42
  • Bant cat 15 dog 8 23 bee 42
  • Cant bee 15 cat dog 8 23 42
  • Dant bee cat dog 15 8 23 42

Step-by-Step Solution

From Step 1 'ant cat 15 dog 8 23 bee 42', the next word 'bee' moves left after ant and the next-highest number 23 moves right before 42, giving 'ant bee cat 15 dog 8 23 42'.
Answer: A) ant bee cat 15 dog 8 23 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-and-number arranging machine rearranges an input line one step at a time. In each…A word-and-number arranging machine rearranges an input line one step at a time. In each…A number-arrangement machine rearranges an input line of numbers step by step. In each…A number-arrangement machine rearranges an input line of numbers step by step. In each…A number-arrangement machine rearranges an input line of numbers step by step. In each…