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.
Set look-up is
O(1)
.How is this solution O(n)?
For each element in arr, it checks if the i in s. "if i in s" is O(n) as well.
In the instructions it was said not to worry about non-integer numbers.
This comment is hidden because it contains spoiler information about the solution
Your code's logic looks pretty similar to mine except it's much more organized.
Though I'd say you wrote too much comment on the specific operations of the code, while focusing on how the code can give rise to the answer would be more beneficial :)
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 don't speak Python, so no.
Several Python solutions seem quite short, so maybe Python allows for less sophisticated solutions than JS (by running them faster).
I am of a mind to keep this as it is though; you could start an 8×8 for Python which requires more performance? (You can always steal the fastest solution from 7×7 to make the 8×8.) (Also, incorporate the idea, somewhere below, to make it run every smaller size as well? Ensures you'll be able to reuse solutions to upsize.) If people start complaining that's too easy, make the 9×9 - there has to be a limit .. :P
This comment is hidden because it contains spoiler information about the solution
Because I like to have fun and competitive coding is also about showing off and/or adding extra spice to a challenge :)
Thank you very much :)
Thanks! :)
It is my first Kata and I wanted to start off with something very easy...
:)
They are already updated.Only update was to return None in cases where discriminant was negative, example tests also expect None now instead of []. If you mean this.