Fix palindromes false positive test #227
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merg
2BFB
e.
Suggestion cannot be applied right now. Please check back later.
As all palindromes have the exact same first and last letter, people only had to test for first and last letter equallity, and the only test where it should return false, it has the first and last letters being different. to pass the whole test people only had to test for first and last letter weither they are equal or not, which make mistakes like this pass the test :
this mistake happens to a lot of people, where they return true inside rather than outside the loop. I myself did this mistake many times.
My change will make sure that the first and last letter of a none-palindrome sentence the same, which returns true if people only tested first and last letter. passing the tests now require people to do the palindrome test properly.