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.
You might find this article on the Python wiki useful:
https://wiki.python.org/moin/TimeComplexity
Hi! I am still new to this so be gentle xD
@Blind4Basics I was just looking over your solution and was wondering about it. Is that O(n)? because in worst senerio does 'if something in dict' not have O(n) complexity? In that case that solution too would be O(n^2) would it not?
It is no doubt faster than the most upvoted, but i think the complexity is the same even though yours is more like : O((n^2 + n)/2) which just translate to O(n^2).
I might be wrong and i would love it if you could explain where my knowlegde is flawed, because it 95 % of the time is xD.
This comment is hidden because it contains spoiler information about the solution
Thank you!
<3
Omg never thought of that! You just made this solution so much better, that means we will only iterate through this once!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I might have misunderstood, but if you run this: litres(12.8) it returns 6 right?
That is the right answer though: 12.8 * 0.5 = 6.4. even if we took 13.8 and we would still round down to six because the assignment tells us to round down always
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution