A number arrangement machine, when given an input line of numbers, rearranges them step by step following a particular rule. An illustration of an input and its rearrangement is given below.
Input: 95 79 48 55 81 50 13 36
Step I: 13 79 48 55 81 50 36 95
Step II: 13 36 79 48 55 50 81 95
Step III: 13 36 48 55 50 79 81 95
Step IV: 13 36 48 50 55 79 81 95
Step IV is the last step of this input.
Input: 70 64 20 83 76 42 24 46
Following the same rule, which of the following will be Step II for this input?
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → 20 24 70 64 42 46 76 83
Compare each step of the illustration with the one before it. In each step, the smallest of the numbers not yet arranged moves to the next place from the left end and the largest of them moves to the next place from the right end, both in the same step; the other numbers keep their order.
Step I: 13 (the smallest number left) moves to the first place from the left, and 95 (the largest number left) moves to the first place from the right
Step II: 36 (the smallest number left) moves to the second place from the left, and 81 (the largest number left) moves to the second place from the right
Step III: 48 (the smallest number left) moves to the third place from the left, and 79 (the largest number left) moves to the third place from the right
Step IV: 50 (the smallest number left) moves to the fourth place from the left, and 55 (the largest number left) moves to the fourth place from the right
After Step IV the numbers stand from the smallest to the largest, so the arrangement is complete.
Apply the same rule to the input 70 64 20 83 76 42 24 46.
Step I: 20 (the smallest number left) moves to the first place from the left, and 83 (the largest number left) moves to the first place from the right, giving 20 70 64 76 42 24 46 83
Step II: 24 (the smallest number left) moves to the second place from the left, and 76 (the largest number left) moves to the second place from the right, giving 20 24 70 64 42 46 76 83
So Step II is 20 24 70 64 42 46 76 83.
Why the other options are incorrect
Option (1) 20 70 64 42 24 46 76 83 — Incorrect. Only 76 has moved; in the same step 24, the smallest number left, must go to the second place from the left.
Option (2) 20 24 70 64 76 42 46 83 — Incorrect. Only 24 has moved; in the same step 76, the largest number left, must go to the second place from the right.
Option (3) 20 70 64 76 42 24 46 83 — Incorrect. This is Step I; in Step II 24 and 76 must also move.