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.
Don't worry about it. I solved this problem in two ways. First, classically, as I would do in a structured programming language, for example in Delphi - using a for loop and a condition. And then, for my own pleasure, in one line. Of course, it's better not to do this in real problems)
You're asking programmers to not explain why bad code is bad.
Great kata of the bowling series, well done.
I knew it! (There is should be an elegant "python" way to do that)!
Wish I had done it this clean!
damn, forgot this method exited haha
i like how every comment is just "this is not best practice!!!"
guys, chill
The count method is called for each unique character in the text, leading to an overall time complexity of π(πβ π)
O(nβ m), where n is the length of the text and π is the number of unique characters. This can be inefficient for large texts.
This comment is hidden because it contains spoiler information about the solution
OP solved it, closing
OP solved it, closing. (Your initial code will not work for odd number of chained calls)
This comment is hidden because it contains spoiler information about the solution
What is the added value of defaultdict in this scenario?
same! :D
In one line but for what price... The code is terribly inefficient. Your solution has more lines but it is faster and cleaner.
Loading more items...