Practice30Create account

A word-and-number machine rearranges an input line in steps. Input: 'gone 34 far 17 tree 62 sky 48'. Step I: 62 gone 34 far 17 tree sky 48. Step II: 48 62 gone 34 far 17 tree sky. Step III: 34 48 62 gone far 17 tree sky. Step IV: 17 34 48 62 gone far tree sky. In each step the largest number remaining among those still unmoved is placed at the left end. How many steps are needed to complete the arrangement for this input?

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

Step-by-Step Solution

There are four numbers (34, 17, 62, 48); one is shifted to the front each step, so the arrangement is complete in four steps (Step IV is the last).
Answer: C) 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 word-and-number machine rearranges an input line in steps. Input: 'gone 34 far 17 tree…A word-arrangement machine rearranges a line of words: at each step it moves the word…A number-arrangement machine reorders numbers by moving the smallest not-yet-placed…A number-arrangement machine reorders numbers by shifting the largest not-yet-placed…A machine rearranges a line of words by moving the leftmost word to the right end at…