Question LR-IO-0007
EasyA word-arrangement machine rearranges a line of words step by step. In each step it moves the word that comes first in dictionary order, among those not yet arranged, to the left end of the unarranged part (just after the words already arranged).
Input: tide ruby soap note mild
What is the final arrangement?
- A.
note mild ruby soap tide
- B.
tide soap ruby note mild
- C.
Show answer and explanation
Answer: C
The machine ends with all words in dictionary order:
Step 1: mild tide ruby soap note
Step 2: mild note tide ruby soap
Step 3: mild note ruby tide soap
Step 4: mild note ruby soap tide