You have repeated this bad explanation several times already. Why do you think that repeating the same thing over and over will give you a different solution?
You still haven't explained what problems you have with the solutions already given, other than "Actually I am not able to proceed". I translate that to "I am too lazy to study the problem". We can't help you with your lazyness.
Please review wfsp's good solution and explain to us in detail why it does not work for you. Other than that, we can't help you further.
If you cannot explain how wfsp's solution does not work for you, I can only recommend hiring somebody who will either teach you problem solving or who will program a solution for you.
|