Ad
  • Default User Avatar

    win is an argument passed to the function, which you said is 1

    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.

  • Default User Avatar

    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