Ad
  • Custom User Avatar

    I spent too much time like for 6 kyu task(

  • Default User Avatar

    I gave up and look at the others'solution .

    Surprise : the second one is very similar to mine

    Strange !

  • Default User Avatar

    Hi

    I'm waiting for the python version to rank this kata , but IMHO it must be approximatively ranked as part II.
    A bit more complex, but same mechanisms are involved.

  • Default User Avatar

    Hi

    No indications about the number of random tests : timed out with 100 passed tests ?

  • Default User Avatar

    Hi
    didn't know this sum function on lists , need to explore

  • Default User Avatar

    Never would have thought of this, nice.

  • Custom User Avatar

    I am morally opposed to bare its, fight me :p

    I'll take your word for it that it's all possible situations.

  • Default User Avatar

    Forget, passed after rereading
    Sorry

  • Default User Avatar

    what about now?

  • Default User Avatar

    you're absolutely right, please change that to use sample, there should be no duplicate choices, and then please self-approve that if there's nothing else that's jumping out at you.
    I'm slightly mad about that you wrapped it up in a describe but that's okay.
    the rationale with it is that those are all possible situations, any other combination/permutation one can come up with will be identical but with renamed symbols

  • Custom User Avatar

    This should do what you want in a more concise fashion. I'm not entirely sure what it is you want this for because we're super sleep deprived but the two are equivalent.

  • Custom User Avatar

    I'm pretty sure I can make the permutation generator you wrote nicer as well if you give me a second.

  • Custom User Avatar

    Approved it, but are you sure you wanted to do random.choices(fruit_names, k=7) rather than random.sample(fruit_names, k=7)?

  • Default User Avatar

    I don't hate the task itself though. Mind pressing green button on my fork? Swapped out description, changed to tuples for pairs, fully rewrote tests. Borderline too many random tests but I think I covered all unique cases so I like it that way. I addressed all of points 1 through 5. (stole+edited your solution as reference.. I suppose it's identical to mine. that was the process though xD) Maybe not even a terrible kata after this?

  • Custom User Avatar

    The mismatch is in that the author claims we should test for your point 2, but their own refsol does not test for it and instead considers any set of three completable trades to be valid - ie according the refsol ab,bc,cd is a valid input. They claimed in the discourse that this explicitly was not valid.

    Honestly we should just get this crap retired, it isn't even a good task.

  • Loading more items...