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. In the final arrangement, which number is second from the right?

Competition practiceInput-Output
  • A39
  • B60
  • C14
  • D27

Step-by-Step Solution

The final arrangement is 'map ox rat sun 14 27 39 60'. From the right, 60 is first and 39 is second.
Answer: A) 39

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