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: kite mango vest 89 48 81
Step I: 48 kite mango vest 89 81
Step II: 48 81 kite mango vest 89
Step III: 48 81 89 kite mango vest
Following the same rule, the machine is given this input: rose 92 pot 70 52 van
Which step is the last step for this input?
- A Step II
- B Step V
- C Step III Correct
- D Step IV
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: 52 rose 92 pot 70 van; Step II: 52 70 rose 92 pot van; Step III: 52 70 92 rose pot van.
Answer: Step III
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!