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.
I've made a new random tests code for this kata. Hopefully, this one is more reliable on the value retrieval and assertion than the previous one.
Let me know if there are issues with it :)
Thanks for your feedback!
Covered all points. Pls check & LMK.
Regards,
Hi, I just checked it, and there are some issues with it:
There's no need for 29k random tests, 100 - 500 should be enough. What you need to focus more on is adding more random tests for edge cases like range out of bound, zero changes, and stuff like that
I suggest that you store the switches for the input on another variable like the expected one, as when the result is wrong the input switches displayed is the same one as the one the user has changed / modify.
Add some description for the
Context
s andIt
sThanks dear, Check now please.
Random Tests are in-action..
Oops sorry, I didn't notice I made the same mistake twice in one line... SHOULD be fixed now...
i = leftBrackets[0]
is wrong because, again, the latest bracket is the last item of the array.I believe it should work now. Thanks for noticing that!
Hi, sorry for the long reply. Looks good to me now. You just need to add random tests.
In the memory cells usage checks:
The first line is wrong as the latest bracket is currently on the last index. The second line is also wrong as when the code is something like this:
+[-[-]>+<]>.
this will result in 0 instead of 1 since the stateskip
from inner bracket still holds.It should be fixed. It wasn't accounting for inputs in the memory check.
My solution uses 3 memory cells and passes all tests.
Fixed!
Fixed!
chai
for assertion. See this: https://docs.codewars.com/languages/javascript/mochachai
for assertion. See this: https://docs.codewars.com/languages/javascript/mochaLoading more items...