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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Is it correct to assume that this solution is O(2n) in both time and memory complexity? (It iterates
arr
whenmap
is called and creates a new array, and then iterates the new array when summing)There are no old-style classes in Python 3. If a class doesn't inherit from anything than it is implicitly inherits from
object
.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
.
Hi :)
I've edited the description that there may or may be not a space.
This comment is hidden because it contains spoiler information about the solution
Be careful with that mutable default argument.
Something is weird with this one.
My tests (test.assert_equals(f(6), 21) ; test.assert_equals(f('6'), None)) are passing, yet when submitting I'm getting an error "✘ n must be an integer: 6 should equal None"