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 1?

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

Step-by-Step Solution

The first alphabetical word 'ant' moves to the far left and the highest number 42 stays at the far right, giving 'ant cat 15 dog 8 23 bee 42'.
Answer: A) ant cat 15 dog 8 23 bee 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 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…