Question LR-IO-0023
EasyA word-arrangement machine rearranges a line of words step by step. In each step it takes the word that comes first in dictionary order among the words not yet arranged and moves it to the left end of the unarranged part (just after the words already arranged).
Input: wolf lamp corn jade hill
What is the final arrangement?
- A.
corn hill jade lamp wolf
- B.
corn wolf lamp jade hill
- C.
Show answer and explanation
Answer: A
Working step by step:
Step 1: corn wolf lamp jade hill
Step 2: corn hill wolf lamp jade
Step 3: corn hill jade wolf lamp
Step 4: corn hill jade lamp wolf