Question LR-IO-0045
MediumA word-arrangement machine rearranges a line of words step by step. In each step it takes the shortest word among the words not yet arranged (if two are equally short, the one that comes first in dictionary order) and moves it to the left end of the unarranged part.
Input: mango fig banana kiwi date apricot
What is Step 3?
- A.
fig date mango banana kiwi apricot
- B.
mango fig banana kiwi date apricot
- C.
Sign up free to see the answer and a step-by-step explanation.