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.
Lol. I did same thing
return True if cnt == 0 else False
is an anti-pattern. Should just be
return cnt == 0
there is no padding for this kata
Last if statement can be part of elif block --> only validate if you have subtracted
The dificulties could differ from one to the other language
I'm delighted with myself that I've finally written the same function as best practice example!
But the Kata was too easy for 5kyu. Feels like 7kyu
I'm sure, it's best practice, cause it's easy to read and it doesn't use bad practices, like an example above.
It is better to write
return False
thanbreak
.Yep! Thats what I did. I do like the current top one more, but yaknow, it works.
i indicates an iteration in this case as well.
for i in string:
This is exactly what an iteration is. You iterate over an iterable. In this case that iterable is a string.
This type of anti-cheat is more than required and will end up being a waste of time because there's always a way around.
good work!
the use of "i" as a variable here might be troublesome -- it's not wrong necessarily, but in most cases, "i" is used in Python to indicate an iteration or count, as in the example:
for i, item in enumerate(some_iterable)
There is an issue with Test Cases.
The following code is wrong but it is able to bypass the test cases:
-- IN WHERE WITH SPECIAL_SALES
SELECT DISTINCT d.* FROM departments d, sales s WHERE d.id = s.department_id and s.price > 90 ORDER BY d.id;
I suggest to remove SQL comments before checking the code.
This was an issue with SQL katas that's been fixed a couple of hours ago. Try again.
i've seen this issue on multiple tests with the correct results.
Loading more items...