A word and number arrangement machine rearranges an input line step by step, following a rule. Here is an illustration of the input and the steps:
Input: bird wall 77 lamp 87 97 flag 28
Step I: wall 77 lamp 87 97 flag 28 bird
Step II: wall 77 lamp 87 97 28 flag bird
Step III: wall 77 87 97 28 lamp flag bird
Step IV: 77 87 97 28 wall lamp flag bird
Following the same rule, the machine is given this input: nest 46 gate 63 kite sun 76 16
Which step is the last step for this input?
- A Step V
- B Step II
- C Step IV Correct
- D Step VI
Rule (from the illustration): In each step the word that comes first in the dictionary, of those not yet arranged, moves to the right end, before the words already arranged; numbers keep their order.
For the new input: Step I: nest 46 63 kite sun 76 16 gate; Step II: nest 46 63 sun 76 16 kite gate; Step III: 46 63 sun 76 16 nest kite gate; Step IV: 46 63 76 16 sun nest kite gate.
Answer: Step IV
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!