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.
win
is an argument passed to the function, which you said is1
the number of mini-wins for that input is 2 maybe that's what you meant. yes. it is.
so, why then are you confused? I'm again guessing that it's because you don't know what your function returns for that input, that you saw that the result is wrong, made an assumption about what you returned but never checked, and never said either - that's what you're missing - what do you think is the answer for that input, what do you think your function returns, what DOES your function return - those are all different things, and by only considering two of them you miss where things have gone wrong.
or.. maybe you mean it should be exactly 2 to be an overall win, but that's not what the problem statement says. There's no way for me to tell whether that's what you mean when you only share a fraction of your reasoning and observations.
My observation isn't from my solution, but just from looking at the problem statement and the given test. Shouldn't the
win
in this case be 2?js/didn't check others:
missing fixed test where a subarray has a matching character multiple times such as
[['OOO', 79], 3]
with the duplicates required to reach the target - instructions state that a sub array may only be counted once. random tests are not sufficiently well crafted to consistently fail such solutionsadditionally, the test output should quote strings in the "testing for ..." it name, that's really annoying when looking to call it myself
Well, yes, you're not saying what your function returns for that or what you think it should return for that. Additionally, there's bit of a flaw with how you print because you show letters but not which subarray it came from so you could have a mismatch there, probably unrelated though.
also why do you have a semicolon on one line but then don't bother. use them or don't damnit, don't mix
I'm a little confused on the generated attempt test. I was given
[[BXUBG,75], [NNLLEGHQ,71], [PGKZJCC,85], [TSMEJKFJ,87], [EEX,86], [DJIZVOZ,79], [KRRFVLR,88]] and 1
'G' is code 71 and 'O' is code 79, both in two separate mini wins. Am I missing something?
I'm confused on throwing with the message 'Just throw like this!'
The tests catch the use of the word throw but I can't get through the last test without using the phrase. Am I missing something, here?
Fam's COOKIN