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.
Great information in this discourse section. Voile sorry you had to deal with this. -.-
That kacarott dude really is a troll displayed by his actions in this discourse section. I've seen him doing this in other discourses and other malicious activities. We found him. Everyone please be aware of this behavior from said person. -.-
.
Done!
Added it
In big random test, the range of
n
is0 - 1e5
. This can be changed to1e4 - 1e5
to ensure that all generated numbers are large integer.Fixed it. Still not sure if its the right way to do it, let me know.
It might be redundant information to some, but I would add to the description:
The current test setup is incorrect:
test.describe
blocks are not terminated bytest.it
blocks, which causes formatting issues and the inability to display runtime.It's not a duplicate. The integers to be paired in that kata is arbitrary, so only brute-force is viable. This kata specifically pairs up integers from
1
to2n
, which admits different kinds of solutions.Duplicate of https://www.codewars.com/kata/587a45b954a6780e37000176
However, your kata has much larger input arrays, which justifies it.
Well it was 50 calls of the function but I was actually making two assertions. I think its not how tests are supposed to be designed so I changed that.
Fixed the function name
Yeah the =6 is just the example. Will change it if it confuses people
One of the assertion groups:
I passed 71 tests before hitting time out. You sure it's 50?
Function name is wrong (initially
pairs
but expectsmake_pairs
)I'm guessing the
=6
is a typo here? otherwise I'm not understanding what you're trying to communicate.It should be stated what range of
n
values will be tested.This is more of a suggestion, but the current error messages are fairly long to the point where running with an incorrect solution often hits the max buffer size. I'd recommend editing those to provide more succinct errors (e.g. instead of listing the entire set of incorrect values, just display the first invalid case).
Edit: I think I get the
=6
, as in, for the provided example 2n is 6. Hopefully that's more obvious to others and I was just overlooking it on first read.The description should disclose number of tests: 30 tests up to 1000 soldiers each. This would allow to deduct that any
HashMap
solution will likely not pass.Loading more items...