Ad
  • Default User Avatar

    Your code is probably falling into an infinite loop in some edge cases, make sure that your code can handle ties between competitors

  • Custom User Avatar

    Hi
    can someone help me please, my solution passed the basic tests but in the random tests i get "execution timed out" please give me some tips,
    thanks.

  • Custom User Avatar

    Finding specific keys in a nested structure is a duplicate to many existing katas.

  • Custom User Avatar

    I did.

    Click on the link and look at that solution.

  • Default User Avatar

    I dont understand what you mean vulnerable to input modification ? can you give a simple real example ?

  • Custom User Avatar

    That's a good solution for part of the problem.

    See this.

    You're really going to have to generate random objects for categories as well. Or at least have several fixed ones, and use them in random order.

    Also, it's still vulnerable to input modification.

  • Default User Avatar

    i fixed that you can see its random now i added the scrambleIt function.

  • Default User Avatar
  • Custom User Avatar

    Thought so. Your random testing isn't random at all.

  • Custom User Avatar

    Your testing is vulnerable to input modification.

    Pass the user solution a copy of any Object random arguments (with Object.assign, or Array.from for Arrays, which are Objects also after all), or call the reference solution before the user solution and temporarily store the answer.

  • Custom User Avatar

    Your reference solution is recursively calling the user solution instead of itself. I've made that mistake myself, before. :P

    Edit: I've fixed that for you.

  • Custom User Avatar

    If I read it right (please newline and indent your code correctly!) you're testing not really randomly, but for every possible category in one fixed object, and always in the same order.

    That makes your testing exhaustive (for this one object), which is good, but it doesn't make it random. I'll try some more cheating, see if it works. If it does, your tests are too predictable.

    As long as there are open issues, it can't be approved. It also has to have (a number of, I think minimum ten each) ratings and rankings, and "Not much" ratings count against you heavily. ATM, you have two; one of them is mine, and I'll update when I am satisied, but the other rater might never come back and rerate, even if you'd deserve that. (The other rater might be smile, and you might get him to rerate by posting a reply to his comment when you have your random testing up to par. But unless a bad rater posts an issue when rating, you can't know who rated how.) I don't know how many "Very" ratings you need to offset one "Not much" and make the kata approvable, but it's many. That's why it's important to get it right right from the start, so people won't rate you badly (and not rerate you when you've made improvements). As it is, your kata might not be approvable for years literally, because of not enough and not good enough ratings. Also, an issue is that this kata already exists. Good luck solving that issue .. you can't unpublish the other one. :P

    But learn the process with this kata, and your next kata can have adequate testing from the start, and you'll pick up much better better ratings. Then it's a matter of being unique and interesting enough for people to solve so you pick up enough rankings and ratings.

    There is some documentation for this, but I happened on it some time and couldn't find it again if my life depended on it. So I reproduced what I remember. The actual docs had numbers and formulas, I think.

  • Default User Avatar

    Hi i have added random tests can you check it , do you know when or how my kata will be approved and pass the beta stage ?
    thanks.

  • Default User Avatar

    Hi i have added random tests can you check now , thanks.

  • Custom User Avatar

    Read other people's kata's tests.

  • Loading more items...