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.
Yes. (And 10 large random tests.)
Can I have two or more examples of the large random tests ? In Python, I see nothing when I print the input. How many large tests are there ?Is it possible to solve it using basic gaussian elimination ?
Nice one. Function's name is not snake case, the test framework should be imported explicitly, and the return type could be a fraction. Anyway, I'm going to approve it (and then fork it if needed) in the coming days if no one complains in the meantime.
Let's go to Mars! ^^
That wasn't present. I added a subsection about the family at the beginning of the rules where I put that information.
Thanks for beta testing it again! (Almost a week.)
I don't think so. I usually pass the tests between 4 to 6 seconds. Sometimes, rarely, it takes 8 or 9 seconds. If you think that the tests are too unbalanced, I can shrink some of them.
I was, exactly five seconds ago, going to add a note about that. The direction of a path is not important. The path
1 → 2 → 3
is the same than the path3 → 2 → 1
. That's why I chose to show paths in different directions in the sample tests.No, but each path can have a different common ancestor. I see your point, I will think of way to make it clearer.
Edit: I changed the formula to
Where
$c_p$
is the common ancestor of a and b on the path p.I accommodated the tests to the new definition: there's now one path between someone and themself.
in this kata: a person has either both a mother and a father, or neither a father nor a mother
I changed the first sentence of the rules to
An ancestor of a person is either themself or any direct ascendant of that person
. I also removed the sentence about the common ancestor when going down from an ancestor to some of their descendant.When I was doing my research, I found that there are other things to take account of when computing the coancestry of two persons for some specific cases (for example when they are ancestor-descendant in one way and cousins in another way). The note is there to inform the user that the formula is not exact for some cases. Maybe I should rephrase it.
Approved, thanks for your work and your support.
Two errors in the sample and fixed tests that I edited:
That sounds good.
Loading more items...