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.
I haven't opened codewars since very long time. I open my email and I find your reply, 12 months after my comment lol.
By saying there are no constraints I meant none were specified in the question. Of course we're limited to the resources used to run the code and our code should run under 12 seconds. But I was asking how did you come to the conclusion that 2520 will be the maximum possible case in this scenario.
Anyways it's not that important. Thanks for your reply. Wish you all the best.
There are always constraints. On codewars we are constrained by the resources given to us and the amount of time alloted to pass. There are
n
that are both practically and theoretically impossible to compute within those time and resource constraints. Can anyone's solution here actually compute up to 2520 in those 12 seconds on codewars' system?I hope that isn't 14 seconds for a single test. There are 100 performance tests ( at least in JS, can't see Python ).
I'm a 100% sure I made a solution that's not O(n^2). I've tried it on my machine with a test case of list of 120K random numbers ranging from -1000 to 1000. The solution took about 14 seconds, and with the normal solution (from the standard kata, which is O(n^2)) it took more than 2 minutes.
This kata is surely hard, I'll try to make it...
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
why did you stop at 2520? there were no constraints in the problem, and the number 2520 isn't common, it's usually a power of 10 or power of 2
bruuuuh XD
Thanks! A great thing to know about for beginners in python.
expected:<1.307530663082039E16> but was:<1.3075306630820394E16>
bro...