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.
great job.
This solution is very inefficient, being O(n^2), when it easily could have been made O(n)
Not every one-liner is clever or best practice.
Tried using this syntax for something else using elifs, didn't realise multiple elses could be chained like this until now.
@sztssp
Maybe perhaps it won't be for a larger data! (like an entire paragraph)!!! Would be a good experiment to test it!
Could anyone explain why this is O(n2) instead of O(n) please?
Me too, i think i learn more by others solutions
This comment is hidden because it contains spoiler information about the solution
didnt know you could make dictionary comprehensions
smart
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
That is not a requirement though. Neither by description, nor by test.
Also insertion-order preservation in dictionaries depends on the python version.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Why does this result have a higher score than looping over set(string)?
Loading more items...