6 kyu

Generate All Possible Matches

Description
Loading description...
Recursion
Fundamentals
  • Please sign in or sign up to leave a comment.
  • RealKenshiro Avatar

    Very good kata! Satisfaction rating should be higher!!

  • user9644768 Avatar

    Duplicate to all find-all paths from roots to leaves.

    • Awesome A.D. Avatar

      B4B is just going to come in and resolve this issue, like the one you raised a minute ago. What's the point?

    • Blind4Basics Avatar
      1. What's the point? It's already approved.
      2. if it's so much of a problem, you should have raised this before, instead of just asking for a question or something
      3. this verison is valuable because made easier with the decription spelling out what the situation is. Just like usual, it's useless to you, but you're obviously not the core target here.

      despite being a ""duplicate"", it's valuable for codewars.

      Issue marked resolved by Blind4Basics 4 years ago
    • user9644768 Avatar

      B4B is just going to come in and resolve this issue

      That won't change anything.

      What's the point?

      Duplicate to all find-all paths from roots to leaves.

    • user9644768 Avatar

      despite being a ""duplicate"", it's valuable for codewars.

      Yeah, 1 + 1 = 2 is always good for humanity, after all here's how everyone starts to learn.

    • Awesome A.D. Avatar

      I'll keep out of this (it's between you two), but I can't help but point out the irony of you posting duplicate issues complaining about duplicate katas :)

    • user9644768 Avatar

      Duplicate issues are always relatively better than duplicate katas, at best this can be retired, but too much effort for me for no gain. :D

    • Awesome A.D. Avatar

      Maybe. But we already have one user going around marking issues "xyz is not novel/interesting/etc.". One is enough, no? :)

    • Blind4Basics Avatar

      (that makes them a duplicate of each others, no?)

    • user9644768 Avatar

      But we already have one user going around marking issues "xyz is not novel/interesting/etc.". One is enough, no? :)

      That's entirely out-of-the-topic, what that has to do with anything going on here? Should I check whether there are users who raise issues about particular things before raising new issues?

    • Awesome A.D. Avatar

      No, indeed, you shouldn't need to check. I'm saying that in this particular case, no check is needed; this issue will magically be raised all by itself. You just have to sit back and wait :) And that's the last sarcastic remark I'll make about that, not here to make enemies.

    • eladkap Avatar

      I can mention here a lot of "duplicate" problems in CodeWars. What do you identify as a "duplicate problem"? It is duplicate because the solution is quite the same for another problem. But the story of the problem is different, and it's the developer/user job to identify the kind of problem and solve it accordingly.

    • Awesome A.D. Avatar

      This comment has been hidden.

    • Blind4Basics Avatar

      Build it an return each...

      thing is... if you don't say it out loud, some users (eg. target audience) won't even know how to implement that.

      (I already put a spoiler flag on your message)

    • Awesome A.D. Avatar

      Sorry, my bad. But it does validate XRFXLP's point about being a duplicate. I.e. it wasn't before the description change, but it is now.

    • Blind4Basics Avatar

      he knows the rules. Link? Then it's possibly arguable (would be left to decide which one is to retire)

  • user9644768 Avatar

    Duplicate to all find-all paths from roots to leaves.

    • user9644768 Avatar

      (Honestly, this is duplicate of atleast 100 katas)

    • Awesome A.D. Avatar

      It kinda wasn't until the author updated the description to reveal the entire process to figuring out the solution.

    • Blind4Basics Avatar
      Issue marked resolved by Blind4Basics 4 years ago
    • user9644768 Avatar

      It kinda wasn't until the author updated the description to reveal the entire process to figuring out the solution.

      Yes, it should be best if the user is left to figure out the relation on his own. Excellent way to hide duplicates. XD

    • Awesome A.D. Avatar

      There are only so many graph problems, so duplicates are unavoidable, and that is fine. A problem has two parts to it: 1) figure out how to solve the problem 2) implement your solution as efficient code. In 8-6 kyu katas, the 1) part is usually given. In higher level katas you have to figure that part out, which is part of the fun! That's why I don't mind writing my upteenth variation on a DFS if it wasn't entirely obvious that a DFS was needed or even apropriate. This was such a case, where I had to think for a minute before realisation struck me (and that is always satisfying, never gets old).

    • user9644768 Avatar

      (and that is always satisfying, never gets old).

      That feeling is entirely subjective, any begineer can easily say for sorting algorithms, Should we keep 100 sorting katas?

  • eladkap Avatar

    The order of match flows is clarified in description.

  • Awesome A.D. Avatar

    This comment has been hidden.

    • eladkap Avatar

      You right - this is up-to k matches and NOT best-of-k. I updated the description and fixed the first sample test (no argument)

      Thanks

      Issue marked resolved by eladkap 4 years ago
    • Awesome A.D. Avatar

      The score increases in iterations of 1.

      NOTE: Pay attention to the order of possible matches.

      iterations should be increments. Secondly, you should specify what the expected order is. I can pay attention to the order of my outputs until the cows come home, I still wouldn't know whether it is right or wrong unless I test it.

    • Blind4Basics Avatar

      thing is, wouldn't it be too much to spell that out? (instead of just saying to the user to pay extra attention to the order of the output)

    • Awesome A.D. Avatar

      wouldn't it be too much to spell that out?

      If it is part of the challenge to figure it out, maybe. But it's not. The challenge is implementing the algorithm. Perhaps I'm being nitpicky, but this is a pet peeve of mine: descriptions that basically say "go run some tests/analyze this example to know what the hell you're supposed to be doing". As an author, it's your job to write a clear, encompassing specification, and it is my job to adhere to that specification and provide an accurate solution. Everything else is a puzzle. If you can't put into words the result you're expecting, then a) how can you expect a user to solve it and b) maybe you're not yet ready to author this kata :)

      (I believe there's even mention of this somewhere in the kata authoring docs).

    • Blind4Basics Avatar

      Well, to me, that's what the challenge was. Once that is told, there is not much left to think about.

      Yeah, this falls into some gray area about what is or isn't a kata, I guess...

    • Blind4Basics Avatar

      well, with that spelled out, I guess it will make a good 6 kyu to introduce users to this kind of algorithms.

    • Awesome A.D. Avatar

      I guess it will make a good 6 kyu

      Haha, I rated this 5kyu, thinking about your hammer...

      Edit: Oh wow, just looked at the new description. Now the entire challenge is indeed given away (identifying that this is a tree and has to be implemented as such)

  • Unnamed Avatar

    What is k? In Example 2 the maximum score is called k, but the description says "best of k (k is a parameter)" and the function argument is called best_of_k.

    • user9644768 Avatar

      Apart from that, description is quite hard to read and assumes a lot from reader:

      1. What is match-flows?
      2. The score steps is 1 offcourse.

      What is score steps?

      Please explain how this output has been concluded: `[['0:0', '1:0'], ['0:0', '0:1']]

      `

    • eladkap Avatar

      Hi guys, I will clarify that more in the description. Score step is 1 means every scoring increases by 1 (like in soccer, ping-pong) not in basketball where there is 2pt and 3pt shots.

      "Best of k" is actually a mistake. I meant the first to score k points wins

    • Blind4Basics Avatar
      Issue marked resolved by Blind4Basics 4 years ago
  • Blind4Basics Avatar

    hi,

    the ordering of the output isn't sepcified (or rather, just say that the output needs to be generated in the shown order)

    cheers