Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • .

  • .

  • .

  • Needs random tests

  • Your test only accept a single way of ordering the letters, which is contrary to what the descriptions says.

  • Why is the expected result of "" false? It's a valid palindrome by itself.

  • Some sample test cases are wrong

  • This kata has a lot of problems. Maybe it should be deleted.

  • If the input is an empty string then it is a valid palindrome string, isn't it?

    Not according to the current example tests:

    Test.assert_equals(palindrome(""), false))
    

    But that's another issue (e.g. the minimal length of a palindrome isn't defined).

  • If the input is an empty string then it is a valid palindrome string, isn't it?

  • I'm not sure I understand you, isn't the whole point that the answer be dependent on the input?

    In this kata there is no way for an empty string to be returned as a valid palindrome string.

  • The empty string is a positive answer for an empty string. Would you really prefer the meaning of an answer to depend on input?

  • Returning different data types from a method is bad practice.

    Doesn't Ruby have some kind of error mechanism? Either exceptions, nil or something else to report errors? In Haskell, you would return Nothing or Just … (which are Maybe String).

    Either way, are there some guidelines like PEP8 for Ruby? By the way, PEP8 states None is fine for non-existing data, so the Python stance probably leads to nil. Could be helpful for the Ruby section.

  • Returning different data types from a method is bad practice.

    Returning an empty string if there is no palindrome would be better than returning false.

  • Loading more items...