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.
What is this code for? Please flag any potential solutions as spoiler content when you talk about them in discourse.
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!
Thank you, changed now!
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.
This comment is hidden because it contains spoiler information about the solution
Thank you, I've removed the invalid
null
,undefined
, and[[]]
inputs for tray now. I've kept atray=[] 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.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.
Oops I totally forget about samples! Done now
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.
Noted, just for clarity you mean the string length of each input right? not the quantity of tests.
Oh sorry, I've changed the config now! (First time using the package)
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)
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!
Noted! I will add that to my specification and try to rewrite a clearer description.
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...