-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edit Distance Recursive solution #305
Comments
Please you can give the example test case so that i can see the issue |
String str1 = "azced"; |
my answer is coming 3 only, you must have taken base condition wrong or pass parameters wrong int editDist(string str1, string str2, int len1, int len2)
} int main()
} |
I was looking at java solution in https://github.com/mission-peace/interview/blob/master/src/com/interview/dynamic/EditDistance.java (this is different) |
that solution is somewhat different and i am not able to understand the last step he has done in return statement so i have changed the code. |
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:
The text was updated successfully, but these errors were encountered: