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.
Best solution I saw so far in regards to performance! I suspect that most of the speed benefit comparing other solution arrive from the i*i part which is very clever.
Honestly it's very clear as well, well done! :)
The type for Result is not stated at Go language variant.
But you can still solve the kata, just code like the following exist (do not add it):
type Result struct {
C rune
L int
}
Very nice as it's O(n) instead of the naive O(n^2)!
hahahahah awesome!
I agree, the description is really problematic... after too much time I learned that:
I hope this help!
Cheating?
You are aware that your code is visible to everyone who solved the exercise right? ;)
You don't, u r asked to return the maximum height of skyscraper you can check. e.g. when you got only 1 egg and 7 tries if u will throw it from 1000 (for ex. sake) and it will break the test will end at once and you won't have a solution, so your best method is to throw it from level 1, if it doesnt break go to level 2 and so on till you got to level 7 and that's why the solution for that will be 7.
Read above :)
Well answering that will be a spoiler I guess... but rest assured there is a reason.
By the way I'm still struggling with this problem... I solved the math but the solution is too slow... will be solved eventually :)
Beautiful!
recursiveCalculation function is not a recursive function since it doesn't call itself to solve the solution but get called multiple times from the outside