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.
You should think for yourself, not in my place.
This code doesn't follow typical styling, which would have the line broken into a couple new lines and helps dramatically with readability. I think some believe one-liners look cooler.
why isn't this logged as issue? ah wait, it is discussed in other comments
probably same issue:
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.
Fixed
Thanks for feedback! I'll mention it
The ref sol is fixed, now onto the description. Description is not very clear on clarifying the behavior of the wind's strength.
You should mention that:
Yes, you understood it correctly.
If the resilience of the i-th house is strictly less than the wind, then it will fall on the next house and reduce its resilience by a(i)
I'm not sure I understand you. The task as outlined in the description is to find the minimum wind speed needed to knock over all houses. If they all need to fall down, then the wind speed should be at least greater than the first house if i understand you correctly?
Wind must be greater than first house if and only if that house must fall
test.assert_equals(min_wind_strength([9, 8, 7, 6, 5]), 10)
test.assert_equals(min_wind_strength([10]), 10)
These seem contradictory. The first should be
9
right? Or the second should be11
.Fixed, try checking this out.
The ref sol is wrong (doesn't align with the task in the description), it expects for the number that can destroy each towers individually (not utilizing falling stacks).
Tests need to be build in a better way: https://www.codewars.com/kata/reviews/6639fdbc97dde3000118cf53/groups/663a05606b6a900001c1bcd1
Loading more items...