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.
Added to JS, Python, and Java.
The formula is not accurate for n > 71. Hence, this solution won't work for even trivial values.
can you tell me what do you mean by the #2 and #3 flaws? I wanna know the bottlenecks they could cause us?
i've added
==
in the description's JS code blocksGood point, calling the object "arr" confused me.
It is definetely not a byproduct of the kata requiring the next highest pair. The reason people haven't been using this solution is because most don't know about it.
I know this is old, but thanks for sharing! Very interesting.
I'm forced to reply to the wrong person, but here we go
Brute force generally means to generate every possible combination until you find one that gives you an answer. In this case, it refers to starting from the bottom of the fibonacci sequence and progressing through it until you arrive at a stopping case (fib(n) * fib(n+1) >= prod).
Hey! I'm new here. Can you please explain what you mean by brute force algorithm?
Thank you for your suggestion!
I saw your solution, but it was not actually working as I expected, so I decided to solve it like this:
https://www.codewars.com/kata/reviews/554398d646002df491000183/groups/5dc2fa1a83a99000015a24ba
They don't have the same mistake. This is the solution of only one person. The others just copied it and submitted it as their own. It's "occurrences".
Good for you! I feel massively inferior for taking more than one minute to write some proper code!
It certainly isn't "best practice". And like the others have pointed out, this is not a performant solution. Probably doesn't warrant a downvote though.
What's more interesting is the fact that 4 separate people had the exact same mistake...
So it's bad because you don't agree with one variable name? Kind of a useless comment.
I think in this case it's hard to describe the task without sharing the solution. I agree with you that this can be confusing.