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.
That's a lot of brains.
No it is not. "Twice" literally means "two times", which makes it strictly speaking O(2n). Since the factor 2 is a constant, it is ommitted in the actual complexity, making it O(n).
You might be thinking of nested loops, where the inner loop iterates over the entire array, for every element of the array, making it O(n*n)
You can read up on the topic here
Walking through the list twice isn't O(N), it's O(N^2).
I felt the same way when I saw this solution ^_^
string formatting... how did I even forget about this
Right? It can be so useful, espeicially parsing some hexs. Mindblowing!
very good
map !!!!!!!! So brilliant.
Yeah, wish they would show completion time for random tests.
It doesn't, since there's no need to. As it says in the description, no non-positive values are passed. All values are positive.
how does this account for negative values?
https://itsmycode.com/python-typeerror-nonetype-object-is-not-subscriptable/#:~:text=The%20TypeError%3A%20'NoneType'%20object,it%20returns%20a%20None%20value.
love that
smart ass
I was pleased to get it down to a simple f-string, but even then I knew there had to be something simpler than writing ten N-calls. Thanks for helping me learn about unpacking!
Loading more items...