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.
But in O notation it will be 3x vs x² i think this is still better than having nested maps or foreach.
I think the issue is fixed, could you please verify?
It seems to be a bug, I'm not sure yet if it's a bug in the kata, or in setup of PHP on Codewars.
No, neither of those two is correct, and at least in PHP (you didn't mention the language), there is no test with
"[[(]])"
as input.Please read the note:
And that's exactly what your code is doing. Not a kata issue.
Kata is perfectly solvable in PHP:
And the highest tested value for PHP is 9294972289. It doesn't say there are 2^31 tests, it says for some languages there can be tests where n is near 2^31.
not an issue, PHP can be solved in 1 second.