Starting from "abcd", I want to go to "badc" :
- I remove "a" -> "bcd";
- I insert "a" at the right position -> "bacd";
- I remove "c" -> "bad";
- I insert "c" at the right position -> "badc".
It's 4 operations. I can't find out a shorter way to do it. However, Levenshtein distance returns me a cost of 3. Why is that?
Thanks for your response.