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.
OP solved it, closing
That was a common issue, the description would have helped.
Don't mutate the input.
It is solvable. The kata just expects [] if the array is empty
and [[]] if the array only contains empty arrays.
so [[]] or [[],[]] would return [[]]
but [] would return []
I do however agree that this is an issue. The kata should either describe what to do in each case, or return the same value for an empty array and an array of empty arrays
You need to think about optimizing the algorithm. A O(N^2) solution is too slow.
I'm having the same problem