Discussion of Question with ID = 040 under Passwords-and-Inputs

This is the discussion forum for this question. If you find any mistakes in the solution, or if you have a better solution, then this is the right place to discuss. A healthy discussion helps all of us, so you are requested to be polite and soft, even if you disagree with the views of others. The question and its current solution has also been given on this page.

Advertisement

Question

"79 75 31 41 96 13 69 63" is re-arranged according to a particular rule, in the steps mentioned below.

  1. 13 75 31 41 96 79 69 63
  2. 13 75 31 41 63 79 69 96
  3. 13 31 75 41 63 79 69 96
  4. 13 31 75 41 63 69 79 96
  5. 13 31 41 75 63 69 79 96
  6. 13 31 41 69 63 75 79 96
  7. 13 31 41 63 69 75 79 96

If step 1 of an input is: 17 35 81 91 95 49 74 99, then what is step 5, if re-arrangement is done according to the above rule?

A

17 35 49 74 81 91 95 99

B

17 35 81 91 95 49 74 99

C

17 35 49 91 74 81 95 99

D

17 35 81 91 74 49 95 99

Soln.
Ans: a

In each step, the smallest numbers are being moved to the left, and in the next step largest to the right side. These are the steps for re-arrangement starting with 17 35 81 91 95 49 74 99:

  • 17 35 81 91 95 49 74 99
  • 17 35 81 91 74 49 95 99
  • 17 35 49 91 74 81 95 99
  • 17 35 49 81 74 91 95 99
  • 17 35 49 74 81 91 95 99

Comments and Discussion