Ad
  • Custom User Avatar

    raise Exception works.

    In JS, it should be throw new Error("error message")

    OP solved it though, closing.

  • Custom User Avatar

    JS Translation added

  • Custom User Avatar
  • Custom User Avatar

    updated description

  • Custom User Avatar

    Good kata, but the task description could mean too many different things. What's really bad is that both "smallest" and "largest" are used, but they are to be considered in a different context:

    • "smallest" palindrome within a given division
    • "largest" (of the aforementioned "smallest" palindromes) across all posssible divisions

    Your task is to shuffle and divide this line into the lowest number palindromes so that the length of the smallest palindrome is the largest.

    It would be much better to pick one of the examples in the description, and show us the different divisions, the "smallest" palindrome in each division, and the "largest" of those "smallest" ones.

    I'm logging this as issue, as time and again users have complained about this in the comments and I feel the description is still below par.

  • Custom User Avatar

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

  • Custom User Avatar

    I feel your pain.

  • Custom User Avatar

    Had the same problem.
    The add, subtract and dot methods must raise errors.
    The equals method must return only true or false even if the vectors have different sizes.

  • Custom User Avatar

    Cool and original!

  • Custom User Avatar

    raise exception is works

  • Custom User Avatar
  • Custom User Avatar

    I have the same question (in Python). I raised an exception and it ends up being uncaught which causes the tests to exit with error code 1, so they fail even though all the tests show passed. It looks like many people have completed this kata though so maybe we're missing something obvious. Though I think the instructions should be more clear about precisely what "throw an error" means.

  • Custom User Avatar

    No, you don't always pick the highest number, otherwise you might end up on side with lower numbers and won't be able to reach bigger numbers later on.

  • Custom User Avatar

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

  • Custom User Avatar

    I think you should to add negative numbers to random tests

  • Loading more items...