Practice30Create account

A word-and-number arrangement machine rearranges an input line in steps. In each step one number and one word are placed alternately from the left: numbers in ascending order (smallest first) and words in alphabetical order, while the remaining items keep their relative order and shift right. For the input 'Input: 45 tree 12 sun 78 rain 33 hill', the machine produces Step I: '12 45 tree sun 78 rain 33 hill' and Step II: '12 hill 45 tree sun 78 rain 33'. Which of the following is Step III?

Competition practiceInput-Output
  • A12 hill 45 33 tree sun 78 rain
  • B12 hill 33 rain 45 tree sun 78
  • C12 hill 33 45 tree sun 78 rain
  • D12 33 hill 45 tree sun 78 rain

Step-by-Step Solution

Step III places the next smallest number (33) in the third position, keeping the rest in order: '12 hill 33 45 tree sun 78 rain'.
Answer: C) 12 hill 33 45 tree sun 78 rain

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 arrangement machine rearranges an input line in steps. In each step…A rearrangement machine works in steps. In each step it picks the word that comes…A word-and-number arrangement machine, given an input line, rearranges it by a fixed…A word-and-number arrangement machine, given an input line, rearranges it by a fixed…A number-arranging machine rearranges an input line of numbers step by step. Example —…