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: 75 wall eagle night year 37 57 91
Step I: 75 wall night year 37 57 91 eagle
Step II: 75 wall year 37 57 91 night eagle
Step III: 75 year 37 57 91 wall night eagle
Step IV: 75 37 57 91 year wall night eagle
Following the same rule, the machine is given this input: 92 ship mango year 58 drum 64 23
What is the final arrangement (the last step)?
- A drum mango ship year 23 64 58 92
- B 58 64 23 year ship mango drum 92
- C 92 year 58 64 23 ship mango drum
- D 92 58 64 23 year ship mango drum Correct
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: 92 ship mango year 58 64 23 drum; Step II: 92 ship year 58 64 23 mango drum; Step III: 92 year 58 64 23 ship mango drum; Step IV: 92 58 64 23 year ship mango drum.
Answer: 92 58 64 23 year ship mango drum
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!