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: umbrella 32 26 oak 36 eagle
Step I: 26 umbrella 32 oak 36 eagle
Step II: 26 32 umbrella oak 36 eagle
Step III: 26 32 36 umbrella oak eagle
Following the same rule, the machine is given this input: eagle 31 vest house 57 30
What is the final arrangement (the last step)?
- A 30 31 eagle vest house 57
- B 30 31 57 eagle vest house Correct
- C house vest eagle 57 31 30
- D 31 57 eagle vest house 30
Rule (from the illustration): In each step the smallest number not yet arranged moves to the left end, after the numbers already arranged; the words keep their order.
For the new input: Step I: 30 eagle 31 vest house 57; Step II: 30 31 eagle vest house 57; Step III: 30 31 57 eagle vest house.
Answer: 30 31 57 eagle vest house
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!