Practice30Create account

A number machine, in each step, moves the largest of the not-yet-placed numbers to the right end (one number placed per step). Input: 7 3 9 5 1. Step I: 7 3 5 1 9. Step II: 3 5 1 7 9. How many steps are needed to fully sort the line in ascending order?

Competition practiceInput-Output
  • AFour
  • BSix
  • CThree
  • DFive

Step-by-Step Solution

Placing the largest at the right each step: after Step I (9), Step II (7), Step III (5) gives 3 1 5 7 9, and Step IV (3) gives 1 3 5 7 9. Four steps are needed.
Answer: A) Four

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 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…A machine moves the smallest remaining number to the left end in each step. Example —…