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.
=)
I think you're right. I think the solution would be to add condition at the beginning that allocates n*sizeof if n>=3 otherwise 3*sizeof.
this should return an error if n = 2 or n = 1
Finally I found a solution for this. I thought backtracking wont work at all but after finding some cases to rule out some trie way ealier it worked. My code needed 8 seconds solve all of the random and basic tests which is not fast at all but at least its working :D
This is by design. [] isn't 'null', so 2 [] are 'same'.
This comment is hidden because it contains spoiler information about the solution
Okay.
thanks bro.
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 ;)
This comment is hidden because it contains spoiler information about the solution
this was way simpler than I thought.
In c you swaped expect and actual. If you turn in a wrong soltuion it will tell that yours is the expected one.
it doesnt make a difference in this case because sizeof(*ret) euqals 1.
This comment is hidden because it contains spoiler information about the solution
I dont get why this works
I am not even sure my solution is correct because theres only one test which is false because of an box mistake.
Loading more items...