Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
  • Default User Avatar

    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.

  • Custom User Avatar

    I've retired this kata due to this fact.

  • Custom User Avatar

    I changed the variable's types to long so the kata is able to handle greater values.I added random tests, too.

  • Default User Avatar

    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.

  • Custom User Avatar

    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

  • Custom User Avatar

    Duplicate of many other katas.

  • Default User Avatar

    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").

  • Custom User Avatar

    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.

  • Custom User Avatar

    Thanks for adding! However, the change doesn't show up in my sample test spots. Do I have to reload soemthign?

  • Custom User Avatar

    Thanks for the update.

  • Custom User Avatar

    C# is still in beta and things like this are the reason why! Thanks for letting us know we will look into it.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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...