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:
| Step | Arrangement |
|---|---|
| Input | sun mango 58 jug 39 30 |
| Step I | sun mango 58 39 30 jug |
| Step II | sun 58 39 30 mango jug |
| Step III | 58 39 30 sun mango jug |
Following the same rule, the machine is given this input: pen 47 71 hill ink 23
What is the final arrangement (the last step)?
- A 71 23 pen ink hill 47
- B 47 71 23 pen ink hill Correct
- C hill ink pen 23 71 47
- D pen 47 71 hill ink 23
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: pen 47 71 ink 23 hill; Step II: pen 47 71 23 ink hill; Step III: 47 71 23 pen ink hill.
Answer: 47 71 23 pen ink hill
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!