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 spent too much time like for 6 kyu task(
I gave up and look at the others'solution .
Surprise : the second one is very similar to mine
Strange !
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.
Hi
No indications about the number of random tests : timed out with 100 passed tests ?
Hi
didn't know this sum function on lists , need to explore
Never would have thought of this, nice.
I am morally opposed to bare
it
s, fight me :pI'll take your word for it that it's all possible situations.
Forget, passed after rereading
Sorry
what about now?
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
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.
I'm pretty sure I can make the permutation generator you wrote nicer as well if you give me a second.
Approved it, but are you sure you wanted to do
random.choices(fruit_names, k=7)
rather thanrandom.sample(fruit_names, k=7)
?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?
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 refsolab,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...