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.
jlb071, that test expects false in every language, the next one expects true. In my previous post I was talking about jenThepilot test, not the OP. PHP tests aren't broken.
I agree the test data for PHP appears broken, in the given example above there is no element in array1 that when squared equals 36100 -- which is an element of array2.
It looks like that's optional, afaik.
This comment is hidden because it contains spoiler information about the solution
why?
Rofl this is the wrong solution :D
Dunno, submission tests time out on php.
This comment is hidden because it contains spoiler information about the solution
jenThepilot: and why would that be false? That test is ok.
yes, I also think that is broken for PHP. It's expecting true in this case.
$a1 = [10000000,100000000];
$a2 = [100000000000000,10000000000000000];
$this->revTest(comp($a1, $a2), true);
@iamlimohd mark your post as having spoiler content when posting code like that. Your function returns false in a case it shouldn't, it's an edge case, and even when it says in the description, the result is self-evident you have to think a little about it. Also your code doesn't handle the same multplicity clause.
This comment is hidden because it contains spoiler information about the solution
Error you're getting is because of input not being an array. Your function should handle that as mentioned in
Remarks
. You can useconsole.log
to see what input looks like.Your code is a bit flawed. You can print the inputs to see which case fails. And next time please mark post as having spoiler content if you post code snippets.
This comment is hidden because it contains spoiler information about the solution
Loading more items...