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.
This comment is hidden because it contains spoiler information about the solution
php does not care
@rubs33 Post your code here marking your post as having spoiler content so we can check what's wrong or this issue will be closed because it's not actionable. I've tried my javascript solution in PHP and it gave me the same error, with no string interpolation, the regular expression is matching this:
, (
which is clearly wrong.What's your code? (Please post with a spoiler flag)
I saw a solution through "View Solution", but it's completely valid.
@rubs33
Well, Thanks Rubens for posting, I'm not a Php Coder But I'll review on some important Points, Some Functions in Php are prohibited, especially string interpolation i.e. ("func")() or $obj->{"func"}() , This was mentioned in the notes section
I'll keep the issue open till mentioning Php translator to take an action...
The array does not modify in the loop, ((arr[0] & 1) + (arr[1] & 1) + (arr[2] & 1) > 1) can be optimized by the compiler.
There is always one winner OR all are winners. Comparing just 2 is enough to return 'all' because of specified condition.
The array is sorted. Therefore, this is the right solution.
Here the problem is the optimality of the algorithm (O(n*log n)). Can be done in one pass of the array(O(n))
.
.
Duplicate.
This comment is hidden because it contains spoiler information about the solution
It only check for 1 result though.
What if I forget to leftpad the answer and so it has a 1/16 chance of failing?
This comment is hidden because it contains spoiler information about the solution
for wich language you have seen this?
Loading more items...