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.
sure thing. actually i found a couple of amazing solutions that i didn't think of. this website is awsome
You're welcome, recursion is a bit tricky until you get the hang of it. Now that you solved it without it, see other solutions that use recursion and analyze how they work.
you are right. i fixed my code using a while loop instead of recursion. it worked fine. thanks again for your time.
No problem, the answer to your problem was there too btw:
thanks
Already answered below.
Because you used a global var, and it keeps its value when your function is called more than once. Please, I know you said you read it, but read this again: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution it says there also how to post code with markdown formatting, etc. We wrote it so we don't need to repeat the same over and over.
I mean, there are different labels for posts here, it's documented in the github page, I'll copy and paste what it says about it:
This comment is hidden because it contains spoiler information about the solution
i posted my code in the questions section
This comment is hidden because it contains spoiler information about the solution
Without a way to reproduce your claim, this is "trust me bro". And that trust is usually not deserved with a comment to this effect. There's no way that others can know that this is different. It probably doesn't lead anywhere either even if you're right, because that still doesn't say what the problem is.
Please don't create issues when after more than 11k solutions in Python, the problem is unlikely in the kata. Use
Question
as the github page says and post your code.This comment is hidden because it contains spoiler information about the solution
that's probably because of the random cases. your code might return a right answer in a specific situation, for example when the matrix is empty and it passes the random tests that generate such matrices
Loading more items...