Practice30Create account

A word-and-number rearranging machine rearranges a given input line one step at a time. In each step it moves the word that comes earliest in alphabetical order (among the words not yet arranged) to the left end, just to the right of any words already arranged, and moves the largest number (among the numbers not yet arranged) to the right end, just to the left of any numbers already arranged; all other elements keep their relative order. Input: sun 27 rat 60 ox 14 map 39. Which of the following is Step 2?

Competition practiceInput-Output
  • Amap ox sun rat 27 14 39 60
  • Bmap ox 27 sun rat 14 39 60
  • Cmap ox sun 27 rat 14 39 60
  • Dmap ox sun 27 rat 39 14 60

Step-by-Step Solution

Step 1 gives 'map sun 27 rat ox 14 39 60'. In Step 2 the next word 'ox' joins the left block and the next largest number 39 joins the right block: map ox sun 27 rat 14 39 60.
Answer: C) map ox sun 27 rat 14 39 60

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 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-arrangement machine, given an input line, rearranges it in steps. In each step…A word-arrangement machine, given an input line, rearranges it in steps. In each step…A word-arrangement machine, given an input line, rearranges it in steps. In each step…