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.
Ah, that's one I didn't expect. Thanks for the reply!
This pretty much sums up what I would have suggested. The suggestion for edge cases is something I would like to see more in katas - it really helps to constantly be aware of unusual cases in real life!
One more thing, your descriptions of
factorise2
andfactorise3
are lacking. I took a lucky guess and assumed you wanted an array of multiples of all the same prime factors forfactorise3
, but even now, I don't know if that's what you intended for the readers. You might want to add a bit more explanation for both functions.Here's a suggestion for
factorise2
:factorise2(n)
returns an array of arrays, where the first is an array of unique prime factors ofn
in the ascending order and the second an array of how many times each unique prime factor occurs. Ex.factorise2(1000)
returns[[2,5],[3,3]]
.This comment is hidden because it contains spoiler information about the solution
Same error after disabling Docker. Any other advice?
Really was looking forward to finishing this kata..
EDIT: Never mind! Apparently I just had to wait a few minutes. :-)
Does this error occur if I'm using regex?
The funny thing is...I'm not using regex. Halp?
Please update the tests to use assertEquals. My submission is failing on one of the tests, but I have no clue what's wrong with it.
I assume it has to do with one of these special cases:
Nothing was mentioned about these in the prompt, but again, I have no clue if that is where it's failing.
Please, for the sake of all of us, use something other than
expect
.I'm getting an odd error under
norm
test, but it passes all of my hand-written tests.Any clue why it might do that?
I'm not sure if the implementation of
random tests
really make sense to me.Others, including myself, have had issues with modifying
available
resulting in bogus expected output for random tests. The reason being: the expected output is being calculated aftercakes()
has been run once.A better way to do it would be to compute the expected output beforehand, save it to a variable, and check against the pre-computed expected output.
Is this a reasonable change to suggest? I would appreciate any opinions the community has on this.