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.
no answer from OP and no evidence given
Ignoring the
$z$
coordinate can give that impression, yeah. You're wrong, author's right. Closing.Approved
Friendship is commutative. (The description doesn't explicitly say this, but I think it's clear from the example given, which has
Harry/Ron
but notRon/Harry
.)Can you post the test case (the first few lines of it, at least) that produced the strange behaviour?
I can't pass the first test case. I had a solution that did return a clique (allowing for if X knows Y, then also Y knows X). The test said there shouldn't be any cliques. So then I coded up a non-commutative alogrithm, and then for the same problem the test harness says there should be at least one (!).
A prematurely approved purple kata creates an unfortunate situation. Any chance you can work on the remaining issues, and also the open suggestions below?
@eurydice5717 if you know how to improve them without changing the essence of the task too much, I’m totally fine with that. Honestly, I agree that this kata turned out to have way too many issues. I kept trying to figure out how to solve them, but after 3 years, the best I could do was just close my eyes and pretend it didn’t exist. Then I just stopped liking the whole idea of the kata because I thought I had created something interesting, but it ended up being pretty mediocre. So, I came to terms with the fact that it couldn’t be fixed and wouldn’t pass review. That’s why I was surprised when I saw an email a couple of days ago saying someone had approved it (thank you for that btw)
Edit: Comment removed
python new test framework
Damn, that's really cool and well thought out!
Especially the return statement. I thought I needed to play let it play out with the first attacker, but that makes much more sense.
for anyone solving this currently and confused by this edgecase: The solver appears to expect the output array to grow by at least 2 on each iteration, so if your result is an empty array after trimming leading and trailing zeroes you can create a new array of list.length + 2 and fill it with zeroes.
Thanks @geoffp - after attempting to read and reread this kata and going slightly mad thinking I couldn't understand it, you've explained it in such a nicer way.
That's true, but there is no better way to do it, short of resorting to a higher-precision floating-point type.
You forgot for double inprecision, basicly floating-point arithmetic, not a good idea.
what a saint
Loading more items...