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.
Hey! Remember to mark your comments as spoiler when you post your code!
Coming to your question, you haven't mentioned what error you are facing.
If its a TLE error you'll have to improve your algorithm, or if there is an edge case try printing the inputs.
Also, there are over 1k submissions with php. So its unlikely anything is wrong with the kata ;)