Ad
  • Custom User Avatar

    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. -.-

  • Custom User Avatar
  • Custom User Avatar

    Done!

  • Custom User Avatar

    Added it

  • Custom User Avatar

    In big random test, the range of n is 0 - 1e5. This can be changed to 1e4 - 1e5 to ensure that all generated numbers are large integer.

  • Custom User Avatar

    Fixed it. Still not sure if its the right way to do it, let me know.

  • Custom User Avatar

    It might be redundant information to some, but I would add to the description:

    Each number in the set has to be used exactly once

  • Custom User Avatar

    The current test setup is incorrect: test.describe blocks are not terminated by test.it blocks, which causes formatting issues and the inability to display runtime.

  • Custom User Avatar

    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 to 2n, which admits different kinds of solutions.

  • Custom User Avatar

    Duplicate of https://www.codewars.com/kata/587a45b954a6780e37000176

    However, your kata has much larger input arrays, which justifies it.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Fixed the function name

    Yeah the =6 is just the example. Will change it if it confuses people

  • Custom User Avatar

    One of the assertion groups:

    Random big tests (50 tests with n < 10**5)
    

    I passed 71 tests before hitting time out. You sure it's 50?

  • Custom User Avatar

    Function name is wrong (initially pairs but expects make_pairs)

    I'm guessing the =6 is a typo here? otherwise I'm not understanding what you're trying to communicate.

    It contains all numbers from 1 to 2*n = 6 once

    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.

  • Custom User Avatar

    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...