Ad
  • Custom User Avatar

    I can't find that statement anywhere in the specification of the kata.

  • Custom User Avatar

    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 a optimization tag?

  • Custom User Avatar

    Reference solution fails when the tallest building has more than one occurrence:

    Testing for min_wind_strength([877, 517, 66, 828, 484, 5, 83, 763, 570, 233, 202, 991, 855, 991, 848, 829])
    992 should equal 993
    

    The highest building is 991, so 992 will topple every building. This is a trivial upper bound.

  • Default User Avatar

    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.

  • Custom User Avatar

    Could you explain this test?

    test.assert_equals(min_wind_strength([9, 8, 7, 6, 5]), 10)
    

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar
    Log
    5:15 am
    Test Failed
      String lengths are both 4. Strings differ at index 2.
      Expected: "0505"
      But was:  "0515"
      -------------^
    

    Random tests sometimes expect the wrong result.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    At least in sample tests: the expected and actual values in assertMatricesEquals are flipped.

  • Custom User Avatar

    Thanks

  • Custom User Avatar

    from rules section:

    All paths start with an upward movement u

  • Custom User Avatar

    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?

  • Custom User Avatar

    res += ...? In a loop? Come oooon... ;)

  • Default User Avatar

    could add it but null undefined etc are not booleans

  • Loading more items...