When a line of words and numbers is fed into a machine, the machine rearranges it step by step following a particular rule. An illustration of an input and its rearrangement is given below.
Input: 40 sand lake 32 93 tree 75 wave
Step I: lake 40 sand 32 tree 75 wave 93
Step II: lake sand 40 32 tree wave 75 93
Step III: lake sand tree 32 wave 40 75 93
Step IV: lake sand tree wave 32 40 75 93
Step IV is the last step of this input.
Input: 67 15 lime 75 45 pear fig plum
Following the same rule, which of the following will be Step I for this input?
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → fig 67 15 lime 45 pear plum 75
Compare each step of the illustration with the one before it. In each step, the word that comes first in dictionary order among the words left moves to the next place from the left end, and the largest of the numbers left moves to the next place from the right end; the others keep their order.
Step I: ‘lake’ (first in dictionary order) moves to the first place from the left, and 93 (the largest number left) moves to the first place from the right
Step II: ‘sand’ (first in dictionary order) moves to the second place from the left, and 75 (the largest number left) moves to the second place from the right
Step III: ‘tree’ (first in dictionary order) moves to the third place from the left, and 40 (the largest number left) moves to the third place from the right
Step IV: ‘wave’ (first in dictionary order) moves to the fourth place from the left, and 32 (the largest number left) moves to the fourth place from the right
After Step IV the words stand in dictionary order on the left and the numbers from the smallest to the largest on the right, so the arrangement is complete.
Apply the same rule to the input 67 15 lime 75 45 pear fig plum.
Step I: ‘fig’ (first in dictionary order) moves to the first place from the left, and 75 (the largest number left) moves to the first place from the right, giving fig 67 15 lime 45 pear plum 75
So Step I is fig 67 15 lime 45 pear plum 75.
Why the other options are incorrect
Option (1) fig 67 15 lime 75 45 pear plum — Incorrect. Only ‘fig’ has moved; in the same step 75, the largest number, must go to the right end.
Option (3) 67 15 lime 45 pear fig plum 75 — Incorrect. Only 75 has moved; in the same step ‘fig’, first in dictionary order, must go to the left end.
Option (4) fig lime 15 45 pear plum 67 75 — Incorrect. This is Step II, where ‘lime’ and 67 have also been moved.