A word arrangement machine when given an input line of words rearranges them following a particular rule in each step. The following is an illustration of the input and the steps of rearrangement.
Input : but going for crept the light sir
Step I : crept but going for the light sir
Step II : crept going light but for the sir
Step III: crept going light but for sir the
Step III is the last step for this input.
As per the rules followed in the above steps, find out in the given questions the appropriate step for the given input
Which of the following steps would be the last step for this input ?
- III
- IV
- V
- VI
- VII
Show answerHide answer
Official CET key: D · Cetking's answer: B — see why below
Approach: Input–output word sorting — fix one word per step, left to right.
Solution:
Rule from the illustration: longer (5-letter) words come first in alphabetical order, then the shorter words in alphabetical order; words are placed one by one from the left.
Target for the new input: cough, fight, sough (5 letters, a→z) then acts, cats, idea, more (4 letters, a→z).
Input: more fight cats cough sough acts idea
Step I: cough more fight cats sough acts idea
Step II: cough fight more cats sough acts idea
Step III: cough fight sough more cats acts idea
Step IV: cough fight sough acts more cats idea
Step V: cough fight sough acts cats more idea
Step VI: cough fight sough acts cats idea more — final arrangement.
No word is already in its final place, so all six placements are needed.
Why the other options are wrong:
A, B, C: stopping at III, IV or V leaves the 4-letter words unsorted.
E: VII would mean placing the last word too, but it falls into place automatically.
Cetking shortcut: Count how many of the first (n − 1) positions hold the wrong word in the input — here all 6 → 6 steps.
Answer: D




