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.
Solved.
This is correct according to PEP 8 styling for python code but in terms of 1 liners, hardly most of them follow this structure. I guess it's all based on preference.
According to PEP 8 – Style Guide for Python Code
Additionally,
I don't think it matters if you use an import outside or inside since the code is still one line right?
Same here.
Hi,
I cannot, because kata are almost unsearchable in the DB...
If you want to take your chances, just close the issue, but don't get surprized if the kata gets retired, or if someone actually finds the duplicate later and makes your kata unapprovable again.
Cheers
I think the test cases are weak, the extra notes at the bottom of the description are not tested at all. (I passed without considering self loops)
As always
Yes, those all involve binary search trees, but none of them, as far as I can tell, actually ask you to implement a search through a binary search tree. Can you point to one of these that actually asks the same thing I am?
Hi,
That's a duplicate (peek most of those). You shouldn't republish it. You still can fix it if you want, to get feedback about the kata creation process.
Cheers
The default Python code has a tab before
return True
. Codewars' editor defaults to spaces, so keeping the supplied return statement while adding any other edits results in ainconsistent use of tabs and spaces
error.Okay, I have rewritten it to follow common Java practices, accessing fields through getters.
I suppose I can include that if I make some very large random tests that will time out with an O(n) algorithm but not with an O(log n) algorithm.
Sorry, Codewars doesn't seem to have a way to save drafts. Should be fixed now.
Error when running tests.
Loading more items...