Study the following example and answer the questions.
An electronic device rearranges numbers step-by-step in a particular order according to a set of rules. The device stops when the final result is obtained. In this case the device stops at Step V.
Input: 85 16 36 04 19 97 63 09
Step I - 97 85 16 36 04 19 63 09
Step II - 97 85 63 16 36 04 19 09
Step III - 97 85 63 36 16 04 19 09
Step IV - 97 85 63 36 19 16 04 09
Step V - 97 85 63 36 19 16 09 04
If the output of Step IV is as given below, what was the input?
Step IV: 92 86 71 69 15 19 06 63 58
Since we know that in every step the series gets sorted in descending order. But it is not possible to know that from which position the number was picked.
Create a FREE account and get: