-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Hamming distance definition differs in Python and Ruby #1867
Comments
I opened an issue in each of the language tracks that have either Hamming or the older Point Mutations exercise, that is also based on the Hamming distance. I'm going to close this issue and let each language track handle this separately. There's an open pull request in the Python track. Thanks so much for bringing this up, it's definitely an improvement. |
FYI - very interesting discussion about this problem here: #1910 |
In Python the test suite seems either to be counting 'missing' characters, or to compare from the end of the string (strangely, this gives the same result in the provided cases).
In Ruby the test suite says to ignore the extra characters
And Wikipedia says the Hamming distance is not defined for strings of different length.
I am not saying the problems cannot be different, but for such a well-defined concept it would make sense to stick to one definition, especially when the READMEs provide so little information about what is expected from the implementation.
The text was updated successfully, but these errors were encountered: