Ad
  • Default User Avatar

    Great!
    Have a good time on codewars!

  • Custom User Avatar

    I stand corrected. I missed that detail. Thanks; very simple fix

  • Default User Avatar

    Hi steffen,
    thank you for the answer. I think you're right but my suggestion is only to modify the description or the example tests to clarify more.

  • Default User Avatar

    The tests are right. Your code is wrong!

    From the description: "When an array in the array is null or empty, the method should return 0 too!"

    As you see in this random test, the first array is empty! So the correct answer would be: 0 and not 6

  • Custom User Avatar

    The basic and random tests in the full suite for PHP might have an issue. The result's always something similar to this:
    testBasicTests
    ✘ Failed asserting that 0 is identical to 1.
    Completed in 0.23ms
    testRandoms
    ✘ Wrong for [[],[39],[37,50,15],[49,36,16,17,14],[16,46,12,22,42,16,28,18],[44,18,15,13],[3,31,19,22,41,39,0],[28,37]]
    Failed asserting that 0 is identical to 6.

    Running the code separately actually returns the correct value - 6 for the random case (and whatever other random value the assertion returns). There must be an issue with how the execution's being done