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.
Please, put spoiler tag next time you post your code.
This comment is hidden because it contains spoiler information about the solution
hm same problem and I am checking for every version of empty or null. I can't check length because it throws an error that says you can't check length for null. I know the code works. it solves 114 of the random cases. There is just some way that I am throwing an error on a single testcase for submit despite the fact that I am checking for every variation there is on an empty array. I know this is just some stupid oversight on my part but I can imagine what it is.
thanks much! makes perfect sense
I'll give it another crack!
Hi!
The random test cases do use very large arrays to test if the solution is efficient enough. If your code passes the initial tests and times out during the random ones, then it just means that your code is running slightly too slow. It isn't bad or broken at all, but you just need to rethink if you can make some parts faster.
Hi my code works super quickly for the tests but when I click on submit it gets through the first test cases and then says "Process was terminated. It took longer than 6000ms to complete". Which happens for me when my code is bad or broken. I am just confused as to why it is happening when the code seems to work otherwise. Maybe it is just that the random cases are far larger arrays and my code is too slow to handle them. Not sure but any feedback is greatly appreciated!