Practice30Create account

A word-and-number arranging machine, given an input line, rearranges it in steps. Rule: in each step the smallest number not yet moved is placed at the extreme left end and all other elements shift one place to the right. Input: cat 34 dog 12 box 56 ant 28. How many steps are needed to complete the arrangement (until every number has been moved)?

Competition practiceInput-Output
  • AThree
  • BFour
  • CFive
  • DTwo

Step-by-Step Solution

The input has four numbers (34, 12, 56, 28); one number is moved per step, so four steps complete the arrangement.
Answer: B) 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 arranging machine, given an input line, rearranges it in steps. Rule:…A word-and-number rearranging machine rearranges a given input line one step at a time.…A word-and-number rearranging machine rearranges a given input line one step at a time.…A word-and-number rearranging machine rearranges a given input line one step at a time.…A word-and-number rearranging machine rearranges a given input line one step at a time.…