Question LR-IO-0005
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: pen ink cap nib box
What is Step 2?
- A.
cap box pen ink nib
- B.
box cap pen ink nib
- C.
Show answer and explanation
Answer: B
Working step by step:
Step 1: box pen ink cap nib
Step 2: box cap pen ink nib