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.
You are welcome, glad you learn something through it ;-)
I wasn’t familiar with DFS algorithms, until now :) I'm fairly algo ignorant still, but a little less so because of you. Thanks for taking the time to put the logic into words so well.
You were right about documentation so here is a fork of this solution, explaining it step-by-step.
Some actual variable names or comments would help people understand what's happening here and why.
but that's already been done. I coded the exact same thing some weeks ago (another beta, that got retired, I guess)
No, reverse.
In Python, function name should be in
snake_case
.duplicate: https://www.codewars.com/kata/5574835e3e404a0bed00001b