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.
The user can modify the input, and the tests expect unspecified output ordering.
There're so many katas about generating combinations that this one cannot not be a duplicate at this point. And no, the kata doesn't have to be "an exact copy" to be considered not novel.
No random tests
IIRC it's a (close / similar)? duplicate of an existing kata
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Except it's badly-written and reinventing the wheel. Currently it's considerably slower than a naive
O(n * log(n))
solution.Fork with an actually efficient
O(n)
code.Seems like an O(n) solution. Well done!
don't comment the obvious
cool
Range is not defined by description, so for TDD if not tested then its not a requirement IMO
Everything above (and including) 4000 does give an OutOfBoundsException with this solution.