Practice30Create account

A number-arranging machine rearranges its input in steps. In each step it moves the smallest remaining number to the left and the largest remaining number to the right of the still-unarranged middle, which keeps its order; it stops when the numbers are fully sorted in ascending order. Input: 47 12 88 35 63 20. How many steps are required to complete the arrangement?

Competition practiceInput-Output
  • AFive
  • BTwo
  • CFour
  • DThree

Step-by-Step Solution

Step I: 12 47 35 63 20 88; Step II: 12 20 47 35 63 88; Step III: 12 20 35 47 63 88, which is fully sorted, so three steps.
Answer: D) Three

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-arrangement machine rearranges a line of numbers so that in each step the…A number-arrangement machine rearranges a line of six numbers. In each step it takes the…A number-arrangement machine rearranges a line of six numbers. In each step it takes the…A number-arrangement machine rearranges a line of six numbers. In each step it takes the…A number-arrangement machine rearranges a line of six numbers. In each step it takes the…