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.
Nice, very neatly done. I wish I would have seen it like that, your solution made me realise it's so much more about problem solving that it is about "code" and syntax.
Great use of the range function. Creating a range function is O(n) right?
Yeah!I done same things.
how is this beautiful except all the character are on one line?
i like it! my way but shoter)
how much worse is creating a list first then appending all the lists to it? I dont really know about big O. bet he wouldnt approve tho
Wow! xD
Yes, runtime on this solution will be n^2 since they are entering every number 1 by 1 and it's an N * N table which means N^2 items will need to be entered.
I'm not here to quibble. Nice solution whether it is the fastest?(who cares - not me :). Very succinct neat code. Lovely solution. Well done you!
I don't believe max runs through the whole array. max will keep track of the maximum value seen along the way. So the time complexity is to run through the zip list once and spit out the highest product of a*b seen. O(n) time.
There is an argument to be made on how fast slicing array[1:] is however, as I believe this creates an entire copy of array from the second element on which may take n time to do (although I am not 100% sure of the time complexity of python's slice feature).
don't prioritize line count over performance.
What's the big O of this? Is it n2? I'm still unsure of the runtimes of list comprehensions.
what a beautiful solution, I'm not used to using lists comprehensions but it's clear that they are powerful tools.
Same here. That led me completely astray, I started by converting to base 10...
Back to square 1.
bro im not the one thats voting so complain somewhere else
Loading more items...