Discussion of Question with ID = 034 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

"51 09 41 45 50 76 87 47" is re-arranged according to a particular rule, in the steps mentioned below.

  1. 09 51 41 45 50 76 87 47
  2. 09 51 41 45 50 76 47 87
  3. 09 41 51 45 50 76 47 87
  4. 09 41 51 45 50 47 76 87
  5. 09 41 45 51 50 47 76 87
  6. 09 41 45 47 50 51 76 87

If step 4 of an input is: 23 24 57 44 25 29 62 84, then what is step 5, if re-arrangement is done according to the above rule?

A

23 24 25 44 57 29 62 84

B

23 44 57 24 62 29 84 25

C

23 44 57 24 62 29 25 84

D

23 24 57 44 62 29 25 84

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 23 24 57 44 25 29 62 84:

  • 23 24 57 44 25 29 62 84
  • 23 24 25 44 57 29 62 84
  • 23 24 25 44 29 57 62 84
  • 23 24 25 29 44 57 62 84

Comments and Discussion