Practice30Create account

A number-arranging machine rearranges an input line of numbers so that, in each step, the smallest number not yet placed is moved to the left end, building the ascending order from the left (the other numbers keep their relative order). Input: 53 27 84 16 49. How many steps are required to reach the final arrangement?

Competition practiceInput-Output
  • A2
  • B4
  • C5
  • D3

Step-by-Step Solution

Step 1: 16 53 27 84 49; Step 2: 16 27 53 84 49; Step 3: 16 27 49 53 84 (fully sorted), so 3 steps are needed.
Answer: D) 3

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-arranging machine rearranges an input line of numbers so that, in each step,…A word-arrangement machine, when given a line of words, rearranges them step by step. In…A word-arrangement machine, when given a line of words, rearranges them step by step. In…A word-arrangement machine, when given a line of words, rearranges them step by step. In…A word-arrangement machine, when given a line of words, rearranges them step by step. In…