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.
When I first saw this, I was like what??!! :D
Probably a 6
What kata rank would you give this one (for Python)?
face => palm
It's not cheating. It's Python.
What an ingenious way!!!
Yes, it's O(n^2): you're using a single loop over O(n^2) instead of two nested loops over O(n) both with common complexity of O(n^2). Also, probably it's not so effective because it's using additional checks instead of just using built-in loops (but this should be benchmarked, not speculated), and it's much less readable; but it has the same time complexity.
a*(a+1) = n*n
Ok, if you say so, what is the time complexity of my own code since maybe i don't really know about time complexity
The task is to generate O(n^2) elements. You can't do O(n^2) work in less then O(n^2) steps.
Bad practice O(n^2)
Because originally it is a Ruby kata, and it's pretty much using a built-in. The kata's rank is shared amongst all languages.
Why is this an 8 kyu kata? My head hurts only reading this solution.
It's cheating!
I thought I needed to have initial values for the dictionary - perhaps it is not necessary.
range(100) was just chosen to be big enough to pass all the tests.
I am far from an expert coder!
Loading more items...