Ad
  • Custom User Avatar

    What is this code for? Please flag any potential solutions as spoiler content when you talk about them in discourse.

  • Custom User Avatar

    I did have the same concern, I just keep the swap counts low enough that it's impossible to have other transformations get a lower swap count than the target orientation for the large random tests. As for the basic random tests, it's possible to hit a bad test but the probability is astronomically low (the rng needs to get the highest swap count, lowest row/column counts, and swap in direct order towards a specific rotation). I have run my solution against 1 billion of basic tests and it doesn't get any bad swaps. I don't want to use my own solution in the tests to check if the swap count is in fact a minimum because that kind of defeats the purpose, so I didn't put any extra checks there, and I don't know any better way so far.

    I'm open to any suggestion on a better random test though!

  • Custom User Avatar

    Thank you, changed now!

  • Custom User Avatar

    Oh, I just realised what you meant with random tests. I think it's because my random test settings don't account for when the settings' swap counts exceed the number of possible rows * columns, it's safe with my own settings, but will produce errors if swap counts get too close or exceed the tray size. I'll adjust the random tests for better flexibility later.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Thank you, I've removed the invalid null, undefined, and [[]] inputs for tray now. I've kept a tray=[] deliverList=[] check since that represents an empty tray and deliverList by default. Other than the test you've encountered in the beginning, the matching of coffee orders and coffee orderings are guaranteed in both fixed tests and random tests.

  • Custom User Avatar

    That is true. I'm not sure how much I should be reducing,
    but I've checked and tweaked the word size and punctuations frequency of non-censored words.

  • Custom User Avatar

    Oops I totally forget about samples! Done now

  • Custom User Avatar

    Thank you, I've halved the random article sizes for now. Do check if it's better for debugging.
    Hmm, I'll probably add another step of random test for only singular words later.

  • Custom User Avatar

    Noted, just for clarity you mean the string length of each input right? not the quantity of tests.

  • Custom User Avatar

    Oh sorry, I've changed the config now! (First time using the package)

  • Custom User Avatar

    It's stated in specifications that words are only separated when there are spaces or newlines in between, so "cake...cake" is considered a word although it looks weird. It keeps the consistency that "ice-cream" is a word. (Other whitespaces are not tested in this problem)

  • Custom User Avatar

    I have revised and written a longer specification list now! I'm aware that this might not be the cleanest description so I will review it again later on. Do make more suggestions if you have, thank you!

  • Custom User Avatar

    Noted! I will add that to my specification and try to rewrite a clearer description.

  • Custom User Avatar

    Hello, I'm the author of this kata (not sure where to put this comment). This is my first time creating a kata, so please do feedback on things like clarity of my description, solution quality, test cases, and any bugs you can find. Thank you!

  • Loading more items...