Question LR-IO-0059
MediumA 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: piano flute drum harp sitar bugle
What is Step 2?
- A.
bugle drum piano flute harp sitar
- B.
bugle drum flute piano harp sitar
- C.
Sign up free to see the answer and a step-by-step explanation.