Question LR-IO-0015
HardA machine rearranges a line of words and numbers. In odd-numbered steps it moves the word that comes first in dictionary order (among those not yet arranged) to the left end of the unarranged part; in even-numbered steps it does the same with the smallest number not yet arranged.
Input: tea bread 29 85 milk 17 eggs 64
What is Step 5?
- A.
bread 17 eggs 29 tea 85 milk 64
- B.
bread 17 eggs 29 milk 64 tea 85
- C.
Sign up free to see the answer and a step-by-step explanation.