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.
Marking as resolved since the translation has been accepted :)
o_O
This comment is hidden because it contains spoiler information about the solution
o_O
std::next
is declared there.This comment is hidden because it contains spoiler information about the solution
hahahahaaaa Yeah
Bro
me too ... Hope you Enjoyed the kata ..My bad,
[[1,2],[0,2],[1,2]]
should actually be[[1,2],[0,2],[0,1]]
That
[[1,2],[0,2],[1,2]]
is indeed connected, and if you ignore the node connected to itself, is also a tree.Also, you need to test not just for connectedness, but also if the graph is a tree or not.
[[1,2],[0,2],[0,1]]
is not a tree, because it contains the path0->1->2->0
I hope that clarifies things.
Sir It's My honor translating my humble kata
... All my katas are yours ... Of course approved... regardsZizou
If B4B's explanation isn't clear enough, I can show more details:
This is a basic logic, very commonly used.
I think your code must implement this logic to look less clumsy :D
Your algo isn't smart enough: try to solve the tests on your own and you'll see that you can open a, b and c there. There are a lot of things to do by deduction in this kata, before going on the dark side of the force (combinations and so on).
Done! Thanks again for verifying the code. It's so difficult to notice these things when my solution code is part of the test code.
I believe it's fixed now.
Loading more items...