Practice30Create account

A word-and-number arrangement machine, when given an input line of words and numbers, rearranges it in steps. In each step the machine takes the word that comes first in alphabetical order among the unshifted words that begin with a vowel, and places it at the extreme left end of the line. Once no unshifted word begins with a vowel, it takes the word that comes first in alphabetical order among the words that remain and places it at the extreme left end in the same way. Every other element keeps its relative position, and the machine stops once every word has been shifted.
Input: umbra 64 kettle 29 igloo 53 basin 78.
In Step 3 of the above arrangement, which element is fourth from the left end?

Competition practiceInput-Output
  • Aigloo
  • Bkettle
  • C64
  • D29

Step-by-Step Solution

Igloo and umbra begin with vowels, and igloo comes first alphabetically, so the order of shifting is igloo, umbra, then basin, then kettle. Step 1: igloo umbra 64 kettle 29 53 basin 78. Step 2: umbra igloo 64 kettle 29 53 basin 78. Step 3: basin umbra igloo 64 kettle 29 53 78. Counting from the left: basin, umbra, igloo, 64 — so 64 is fourth. Stopping a place short gives igloo and going a place past gives kettle. The tempting error here is to shift basin before umbra because b comes before u; the vowel rule overrides ordinary alphabetical order.
Answer: C) 64

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, when given an input line of words and numbers,…A word-and-number arrangement machine, when given an input line of words and numbers,…A word-and-number arrangement machine, when given an input line of words and numbers,…An arrangement machine reshuffles an input line by interchanging one pair of elements…An arrangement machine reshuffles an input line by interchanging one pair of elements…