i am facing a problem with ur test suite 5. is it correct?
even the built-in matlab function 'edit distance' is giving the result 3.
which i believe is the correct one.
if i am not wrong, according to demarau algorithm - here transposition will not occur.
Test case #5 is correct, Asif. If you want, you can try it on wolfram alpha using DamerauLevenshteinDistance['abc','ca']. Be careful, because the algorithm from wikipedia has errors.
Another example that should return 2 via Damerou-Levenshtein and 3 via Levenshtein alone: 'jellyfish' and 'jellyifhs'.
Program an exclusive OR operation with logical operators
640 Solvers
Arrange Vector in descending order
4100 Solvers
Number of 1s in a binary string
2839 Solvers
How many trades represent all the profit?
520 Solvers
463 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!