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.
You must not have read the comments there. I specifically did not spoiler some comments about it, because I thought people should know ( I ran into it myself until somebody pointed it out ).
The test quality is poor; it's 50 random tests of
n < 1e6
along withn = 0, 1, 1e8
. The original code can pass the tests once it returns the correct answer forn = 1e8
without trying to compute it.But then bumping the input range of random tests will also cause timeouts. Not even the faster solution finishes all the tests if the 50 random tests are bumped to
n < 1e7
.This comment is hidden because it contains spoiler information about the solution
10e6
and10**6
( and same for 8 ) are not the same thing.This comment is hidden because it contains spoiler information about the solution
retired
retired
null
is not an array. The description should be correct and consistent.This is unspecified.
it no longer passes
If all issues are resolved, you can republish the kata.
Kindly check again @rowcased
Have added a few valid swaps for sample tests
I have updated the tests as per the docs. Please give them another look. Have also updated the description to capture no direct exhange of gifts.
There should be at least one sample test with a valid swap.
Loading more items...