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.
Read this:
I mean the one you mentioned in the top post: "btw, I had another solution which wasn't O(N²) but something in between, as each point checked can be ignored in the next run. So N * (N-1) * (N-2)..." - did it pass?
Still, it is O(N²). Did it pass tests here for this kata?
Kata is now retired.
Yeah i guess lowest assesment of 5kyu for this kata was pretty accurate
Haha when I saw you comment I totally agreed about mine too :)
are you sure you don't have ANY float calculations anywhere? because 6/7 digits form the end makes those close to 16 digits from the left... Which is precisely the kind of precision you get with floats... x)
Nope. https://github.com/Codewars/codewars.com/issues/540
(And I marked your question as spoiler in case it gives somebody else ideas...)
(warning with code duplication, yet... ;) )
The greater the struggle, the more the satisfaction when you finally complete it ;-)
:-)
So I guess the question can be marked as resolved?
The tests aren't heavy anymore (as they were at the beginning, but the rank has been changed afterward, so the test suite has been updated). If you want to see if your code is performant, open a fork of your solution and replace the following parts in the
tests_random
method:for (int sb: new int[] {15,30,50})
withfor (int sb: new int[] {15,30,50,80,120,150})
.for (int t=0 ; t < 100 ; t++)
withfor (int t=0 ; t < 110 ; t++)
That's the original version.
yes, you are pretty close. ;)
the order has no importance because "your" output is sorted before the assertion.
Yeah. I mean, your regex should work fine. Might be a bug in whatever Java version CW uses?
Loading more items...