donotmindit wrote:
plz help me to get a program
Instead of asking for a programm, a better question would have been: "Please help me to understand the algorithm", since you stated you didn't understand it.
See here:
Wikipedia[
^]
The word's "please" by the way, not "plz".