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.
This comment is hidden because it contains spoiler information about the solution
Never mind
I don't understand the description either
The description is absolutely unambiguous:
That means you have in total
n
eggs, and in totalm
tries. Once an egg is broken you cannot use it anymore. From there you must reason, what you have begun to do, but no need to share it publicly (that's why I marked your comment with a spoiler flag), and find the solution.It is the same in all katas, for all languages. The code is compiled once (when needed), then the tests are launched in a row, they are not isolated, and memoizing is definitively not cheating, no matter what you may believe or not. It's a current practice; several katas encourage to use it, and it might even be necessary for some of them (though I have no concrete example in memory).
And what you name cheating is not; it's an optimization technique. Though it is neither sufficient nor necessary here, apparently.
Your current approach is O(n), but there exist O(log(n)) approaches.
That's where you are wrong, there is more to be done. I mean there exist even more efficient ways of computing terms of the Fibonacci sequence.
You don't know in advance how many eggs you have, neither the number of trials. There is nothing to explain about how one is different from another. They can be any random values.
Many times it does. By just reading your comment, one gets a serious hint about how to solve this kata.
Please use a spoiler flag, comments are visible to everyone by default. I've just put the flag on for you this time.