Practice30Create account

A machine processes a line of words and numbers. In each step it moves the smallest number to the next position from the left; words keep their relative order and shift right. Input: dog 24 cat 11 bird 36. Step I: 11 dog 24 cat bird 36. Step II: 11 24 dog cat bird 36. What is the final arrangement?

Competition practiceInput-Output
  • A11 24 36 dog cat bird
  • Bdog cat bird 11 24 36
  • C11 24 36 cat dog bird
  • D11 24 36 dog bird cat

Step-by-Step Solution

The numbers are pulled left in ascending order (11, 24, 36) while the words keep their original order (dog, cat, bird). The final line is 11 24 36 dog cat bird.
Answer: A) 11 24 36 dog cat bird

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 number machine, in each step, moves the largest of the not-yet-placed numbers to the…A machine moves the smallest remaining number to the left end in each step. Example —…A machine moves the alphabetically first remaining word to the left end in each step.…A machine moves the largest remaining number to the left end in each step. Example —…A machine moves the shortest remaining word (fewest letters) to the left end in each…