Practice30Create account

A machine arranges numbers in ascending order from the left; each step moves the smallest not-yet-arranged number to the front of the unarranged part, and it stops when no number needs to move. Example: Input: 50 40 30 20 10; Step 1: 10 50 40 30 20; Step 2: 10 20 50 40 30. How many steps in total are needed to complete the full arrangement?

Competition practiceInput-Output
  • A4
  • B6
  • C5
  • D3

Step-by-Step Solution

Step 3 gives 10 20 30 50 40 and Step 4 gives 10 20 30 40 50; once four numbers are placed the fifth is automatically in position, so 4 steps are needed.
Answer: A) 4

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 machine arranges words in dictionary order from the left; each step moves the…A word-arranging machine, in each step, moves the word that comes earliest in dictionary…A number machine, in each step, moves the largest of the not-yet-placed numbers to the…A number machine, in each step, moves the smallest of the not-yet-placed numbers to the…A word machine, in each step, moves the word that comes last in dictionary order among…