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.
It depends on what you're working on. If this function were part of a website backend counting characters in usernames or something, it doesn't really matter at all. But if this is a helper function that is responsible for comparing billions of base pairs in genetic sequencing or part of a stock trading platform where microseconds matter, then you need to rethink it.
Would it matter? I assume itll be a O(2n) vs O(n) but I'm not sure if that's a big deal.
This comment is hidden because it contains spoiler information about the solution
Lol, me too. In case I need to translate it to C later.
that is a smart solve ,, i like it , i know that is don't best practice and there was more solutions is more readable than it's but this is a new practice and a new way for the solution for me, so i like it.
i know my english language is bad :)
I didn`t even know about count method and used loops, lol. Thanks for the best solution!
when you use if nums
python check if the list at least have one element and return true
if list is empty python return false so automatically the if block is not excuted
what's the problem?
Like the clean cut solution! But I think, it defeats the purpose of beginner-friendly critical thinking, breaking down problems etc. Good work nonetheless :)
did the same, so neat!
sweet. didn't think of this.
i enjoyed it bro
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Cant believe i didn't think of that, DOH!
Loading more items...