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 1?

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

Step-by-Step Solution

The earliest word alphabetically is 'map' (moves to the left end) and the largest number is 60 (moves to the right end); the rest keep their order. Result: map sun 27 rat ox 14 39 60.
Answer: B) map sun 27 rat ox 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-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…