Ad
  • Custom User Avatar

    Why return true for empty array?
    The description says:

    If a or b are nil (or null or None), the problem doesn't make sense so return false.
    If a or b are empty the result is evident by itself.

    "Evident by itself" must mean "the problem doesn't make sense so return false" as well.
    Otherwise shouldn't we return true for NULL arrays.

    Please make the description clear.

  • Custom User Avatar

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

  • Custom User Avatar

    I don't undertand, I have the same problem, if the test is OK then in $a1 should be 190 because of 36100 in $a2. Am I missing something obvious? And what null are you talking about?

  • Custom User Avatar

    Thank you, I understood how Null works )))

  • Default User Avatar

    Sorry, no bugs in the tests; they are the same in all languages; 8000 guys passed the kata (198 with PHP).

  • Custom User Avatar

    I can not pass the PHP test - get error "Failed asserting that false matches expected true".
    The square root of 36100 is 190. But there is no such value in the first array.
    Array
    (
    [0] => 121
    [1] => 144
    [2] => 19
    [3] => 161
    [4] => 19
    [5] => 144
    [6] => 19
    [7] => 11
    )

    Array
    (
    [0] => 121
    [1] => 14641
    [2] => 20736
    [3] => 36100
    [4] => 25921
    [5] => 361
    [6] => 20736
    [7] => 361
    )