Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

string transposition algorithm

Suppose there is given two String:

String s1= "MARTHA"
String s2= "MARHTA"

here we exchange positions of T and H. I am interested to write code which counts how many changes are necessary to transform from one String to another String.

like image 897
dato datuashvili Avatar asked Jun 19 '10 14:06

dato datuashvili


1 Answers

There are several edit distance algorithms, the given Wikipeida link has links to a few.

like image 66
Donnie Avatar answered Nov 15 '22 08:11

Donnie