Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Levenshtein algorithm

dppdpp Posts: 3Member
hi,i just came across the string distance algorithm.
I took a paper and a pen to work out the exact algorithm.The answer seems to be correct.
But i could not understand why it is like that.
to fill d[i][j]
we look left,top,left diagonal.
(i guess this is where we check whether to insert,replace or delete)
But i am not sure how it is and why it is.
Can someone explain me why d's are checked for all three conditions .
I went throught this algo in wiki andhttp://www.merriampark.com/ld.htm



Sign In or Register to comment.