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.
This comment is hidden because it contains spoiler information about the solution
Q: Does this have a problem with empty input?
That's the wrong question. The correct question is, it's not specified at all how
1
is handled.I've changed the input range to
n > 1
. Given that1
should be omitted it doesn't make sense for1
to be the input anyway.This comment is hidden because it contains spoiler information about the solution
Nice :)
Yep, 1 is definitely not prime. I was slightly surprised by that being ommited from the spec, but it was not included in the test cases for JavaScript.
It would be nice to have large test cases to force linear complexity
Yes, because you can choose who moves first
Python tests contain
1
as starting count. And failed due to lose.Is this reasonable?
This comment is hidden because it contains spoiler information about the solution