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: bell 53 52 gate rain 75
Step I: 53 52 gate rain 75 bell
Step II: 53 52 rain 75 gate bell
Step III: 53 52 75 rain gate bell
Following the same rule, the machine is given this input: moon drum 51 rain 79 63
What is the final arrangement (the last step)?
- A 51 79 63 rain moon drum Correct
- B moon drum 51 rain 79 63
- C 51 rain 79 63 moon drum
- D 79 63 rain moon drum 51
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: moon 51 rain 79 63 drum; Step II: 51 rain 79 63 moon drum; Step III: 51 79 63 rain moon drum.
Answer: 51 79 63 rain moon 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!