Loading practice questions
What is the edit distance between the strings "abcd" and "acbd" when the allowed operations are insertion, deletion and substitution?
Correct Answer: B — 2
Explanation:
The string "abcd" can be changed to "acbd" by substituting "b" with "c" and "c" with "b". Thus, the edit distance is 2.