Ad
  • Custom User Avatar

    How is "momsie" a palindrome?

    The test case is wrong, I guess.

  • Default User Avatar

    JS :

    • Your function should accept a string as a parameter

    The test cases include non-strings.

    Plus as noted below

    • duplicate of a bazillion palindrome kata
    • no test for performance though it seems to be implied in the description
  • Custom User Avatar

    It's a duplicate. With 21 other search results for "palindrome" on JavaScript, yes, that's an issue.

    If you're going to ask for the most efficient implementation, at least measure a solution's efficiency. Yes, it is possible to measure the time it takes a solution to run the tests. No, it's not an exact science, because of varying server load. But with that addition to the tests (huge tests if you want to measure anything other than 0 ms, but hey, that can be done), you would have something that's not the umpteenth duplicate.

    As it is, you don't even have random tests. Which, admittedly, allows for very, very efficient "solutions".