Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
Yep...
I believe this solution is not correct anymore as it is throwing OverflowException for the last test with number 89. Type int should be replaced with long.
I've retired this kata due to this fact.
I changed the variable's types to long so the kata is able to handle greater values.I added random tests, too.
Only a small issue:
My solution only kept letters, and removed both special characters AND numbers (despite the description stating numbers matters).
However, it still passed all the tests. I don't think this is intentional.
nielsup - I had the same issue for quite awhile. Give it a try now, seems to be working
https://github.com/Codewars/codewars.com/issues/5
Duplicate of many other katas.
One letter test is needed ("0981428 a 9203084").
Even number of letters case is recommended ("ABBA");
Empty string case is needed ("9732908071280", also string.Empty).
"Miss by one" examples are needed ("xaxa", "bummud").
I think this kata would be better with another name like 'special palindrome' or 'ninja palindrome', given that it contains some exceptions, also as @parabola949 says, try to improve the description.
Thanks for adding! However, the change doesn't show up in my sample test spots. Do I have to reload soemthign?
Thanks for the update.
C# is still in beta and things like this are the reason why! Thanks for letting us know we will look into it.
This comment is hidden because it contains spoiler information about the solution
Update description a little more, adding punctuation:
Given a word or a sentence, determine if the inverse of the word or sentence is the same as the original.
Only letters and numbers matter; ignore special characters and white spaces.
For instance: < a not e
Since you specified letters and numbers, it would also be good to have some test cases with numbers
Test methods:
GivenAInvlidPalindromeWithSpecialCharactersOutputShouldBeFalse
These are very difficult to read. Would it not be easier to use the string parameter of Assert.AreEqual?
Assert.AreEqual(false, Kata.IsPalindrome("Hello ./?!@#$%^&*(){}[];'\|<>,"), "Invalid case with special characters should return false.");
Then have a single test method?
Loading more items...