-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Description
Please change the recursive call to find the min by removing the check for same characters and make that condition as a separate one (as it is producing wrong output).
code:
if(str1[len1] == str2[len2])
return recEditDistance(str1, str2, len1 + 1, len2 + 1);
return 1 + min(recEditDistance(str1, str2, len1 + 1, len2 + 1),
recEditDistance(str1, str2, len1, len2 + 1),
recEditDistance(str1, str2, len1 + 1, len2));
Metadata
Metadata
Assignees
Labels
No labels