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 can't find that statement anywhere in the specification of the kata.
Tag
binary search
is not needed anymore as reference solution has since changed to a different algorithm.Array size is at most
50
. Why is there aoptimization
tag?Reference solution fails when the tallest building has more than one occurrence:
The highest building is
991
, so992
will topple every building. This is a trivial upper bound.Wind doesn't go through buildings. When a house breaks, it “stays in place” and therefore it takes + wind to knock it down so the wind can pass through.
Could you explain this test?
Why isn't a wind strength of 9 sufficient?
A wind with strength of 9 is enough to collapse the first house. It doesn't matter that the first house does not fall onto the second house because the wind is already stronger than all the remaining houses.
I think it would have been better if you had tried to get to the algorithm properly. You would have learned more. Using the solution is good when you already know how to get to the solution.
A little disappointing to see that there is already a solution to the problem. Surely that function uses the same algorithms that we are supposed to write. But using this solution takes away all the fun from the problem. It's literally like writing a "hello world." The only value of the kata itself is having discovered that this function exists, I guess.
Random tests sometimes expect the wrong result.
This comment is hidden because it contains spoiler information about the solution
At least in sample tests: the expected and actual values in
assertMatricesEquals
are flipped.Thanks
from rules section:
Are there any tests where the first character is STAY?
If so, do you use STAY after UP or STAY after DOWN in that position?
res += ...
? In a loop? Come oooon... ;)could add it but null undefined etc are not booleans
Loading more items...