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 don't know how you run your tests, because the small random tests are already failing some of the times even with the unmodified setup. I don't even need to do anything special to get screwed up by false negatives produced by the random tests.
Anyways, use this if you want
@Voile, i inserted your checker function inside tests as reference solution and took mine as secondary. it passed. also generated 10 000 fib numbers in local machine and each time checker function returned true it searched in array of "hand" generated fib numbers. i could not find number for which it returned true and number was not fib
The solution I submitted is exact, and is about as performant as the reference solution (I think it's a bit faster)
Lower the perf constraints and allow optimised exact methods to pass.
And anyways, this solution exists, so...
Reference solution is probabilistic, but the false negative rate is unacceptable. Under the current setup, when tested against 5000-10000 fibonacci numbers, the reference solution fails most of the time. It's even failing the unmodified tests some of the times.
Randoms tests are sometimes passing in negative values. This is not expected (nor are we told how to handle them. It seems that they all expect
false
)Tests are still too weak. I don't know if it is possible to invalidate solutions like this one.
biggest number in sample test is if i am not wrong something like ~400th Fibonacci number. in random tests they starting from ~500 000th Fibonacci number, so there is no way to calculate square root of that in reasonable amount of time
This comment is hidden because it contains spoiler information about the solution
i will translate to python probably tomorrow. by the way how do you test squares ? because if you test it searching for root there is no chance to handle those numbers
THANK YOU for those second issue you mentioned : I couldn't understand at all why i could not update solution code on this and another kata because of that issue.
Also updated tests - now solution you mentioned should not pass
This comment is hidden because it contains spoiler information about the solution
I have now added some random tests! Thanks for the reminder.
No random tests https://docs.codewars.com/authoring/guidelines/submission-tests
Loading more items...