A word arrangement machine, when given an input line of words, rearranges them step by step following a particular rule. An illustration of an input and its rearrangement is given below.
Input: rabbit neem tent galaxy radish museum
Step I: rabbit neem galaxy radish museum tent
Step II: rabbit neem galaxy museum radish tent
Step III: neem galaxy museum rabbit radish tent
Step IV: galaxy museum neem rabbit radish tent
Step IV is the last step of this input.
Input: seal salt canvas kangaroo violin almond
Following the same rule, which of the following will be Step III for this input?
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → canvas kangaroo almond salt seal violin
Compare each step of the illustration with the one before it. In each step, the word that comes last in dictionary order among the words not yet arranged moves to the next place from the right end, and all the other words keep their order.
Step I: ‘tent’ comes last in dictionary order among the words left, so it moves to the first place from the right
Step II: ‘radish’ comes last in dictionary order among the words left, so it moves to the second place from the right
Step III: ‘rabbit’ comes last in dictionary order among the words left, so it moves to the third place from the right
Step IV: ‘neem’ comes last in dictionary order among the words left, so it moves to the fourth place from the right
After Step IV the words stand in dictionary order, so the arrangement is complete.
Apply the same rule to the input seal salt canvas kangaroo violin almond.
Step I: ‘violin’ comes last in dictionary order among the words left, so it moves to the first place from the right, giving seal salt canvas kangaroo almond violin
Step II: ‘seal’ comes last in dictionary order among the words left, so it moves to the second place from the right, giving salt canvas kangaroo almond seal violin
Step III: ‘salt’ comes last in dictionary order among the words left, so it moves to the third place from the right, giving canvas kangaroo almond salt seal violin
So Step III is canvas kangaroo almond salt seal violin.
Why the other options are incorrect
Option (1) canvas almond kangaroo salt seal violin — Incorrect. This is Step IV, where ‘kangaroo’ has also been moved.
Option (2) almond canvas kangaroo salt seal violin — Incorrect. Here ‘salt’ changes places with ‘almond’; the machine moves ‘salt’ into that place and the other words keep their order.
Option (4) salt canvas kangaroo almond seal violin — Incorrect. This is Step II; in Step III ‘salt’ must also move.