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.
An observation of mine, a little bit of a misleading description, I get it though it adds up eventually being unnecessarily out of scope, it's a thing making it puzzling and tricky though 'till some exent I'd like to say in general, except for that even this new only mathematical optimization sort of like hype ongoing it's definetely off-topic rather than something strictly context based given it should be algorithms first, at least to me.
Not gonna happen anymore.
raise Exceptionworks.In JS, it should be
throw new Error("error message")OP solved it though, closing.
JS Translation added
updated description
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:
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.
This comment is hidden because it contains spoiler information about the solution
I feel your pain.
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.
Cool and original!
raise exception is works
Nice!
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.
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.
Loading more items...