in reply to Re^2: Help Me to Sort out from this
in thread Help Me to Sort out from this

I tried alot.

Why not provide a couple of the algorithms which you tried? Someone might then be able to point out where you were going wrong. Perhaps even one of those algorithms was a valid one and it was merely your code which was flawed. But again, with neither algorithm nor code to view we will never know.