# Discussion of Question with ID = 033 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.

### Question

"vary abys 54 21 85 hand 06 malt" is re-arranged according to a particular rule, in the steps mentioned below.

1. abys vary 54 21 85 hand 06 malt
2. abys 85 54 21 vary hand 06 malt
3. abys 85 hand 21 vary 54 06 malt
4. abys 85 hand 54 vary 21 06 malt
5. abys 85 hand 54 malt 21 06 vary
6. abys 85 hand 54 malt 21 vary 06

If an input is: idea quad 25 sack 48 57 cafe 14, then what is step 4, if re-arrangement is done according to the above rule?

A

cafe 57 idea 48 sack quad 25 14

B

cafe 57 idea 48 quad 25 sack 14

C

cafe quad 25 sack 48 57 idea 14

D

cafe 57 idea sack 48 quad 25 14

Soln.
Ans: a

In each step, English words and numbers are alternately being arranged. Strings are in ascending order, and numbers are in descending order. An English word is placed, then a number, and so on. These are the steps for re-arrangement starting with idea quad 25 sack 48 57 cafe 14:

1. cafe quad 25 sack 48 57 idea 14
2. cafe 57 25 sack 48 quad idea 14
3. cafe 57 idea sack 48 quad 25 14
4. cafe 57 idea 48 sack quad 25 14
5. cafe 57 idea 48 quad sack 25 14
6. cafe 57 idea 48 quad 25 sack 14