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.
Your logic is correct but solution is not. In the second example we can remove the black pegs and see that you're matching three
1
's insideguess
with a single1
insideanswer
which is obviously wrong:If graph is connected isn't a solution, for example.
When you for example test {0:[1,2,3], 1:[0], 2:[0], 3:[0]}, this graph is connected, however you're able to split persons for two groups ([0] and [1,2,3] .
Graph don't have to be disconnected, to be True. I believe you failing this part, but I may assume wrong.
You need to provide some concrete information or nothing can be done.
Your code not working is not an issue (= a bug in the kata), maybe a question? Please refer to the documentation: https://docs.codewars.com/training/troubleshooting/