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'm sorry. Please clarify the question. Each of the 3 lists a, b and c are 5K-10K length. This takes time. Agreed?
The lists are generated by appending to end of list. It's a 6 Kyu, so no need for gymnastics because it works. Clear?
That depends on how the expected result is generated, if the random lists are generated and then the expected result with a control function, that would be expensive. Maybe one random list should be generated and then the three lists generated with some elements in common with that, that sounds cheaper. Note: I hadn't see the testing suite myself, only guessing.
Ok, I passed the tests...
But I wonder how test generation can take such a long time, these are just random lists.
Maybe lists with a special pattern?
Thanks.
Nope, that 9s is reference solution + test generation and validation. It might be the case that reference solution actually takes 1s while rest of the time get eaten up by the test generation and validation.
This comment is hidden because it contains spoiler information about the solution
thank you my friend. apparently i forgot to delete those from my code. i often use print statements to see whats wrong with my code in my interpreter. when i copied my solution here i forgot to delete those print statements.
finally my code works without time complexity. im so happy to finish this kata.
Thx. I'll add to all.
Print statements use a lot of space. Comment out print statements if you have any.
Buffer size quickly runs out if you use print().
Try commenting out all print statements.
Sure. Thanks!
i fixed that problem, now a new one arised. space complexity
my code errors: max buffer size reached. is it due to space complecity? how large are the test inputs really?
With your solution, you will parse b and c, a times (On² solution, that is)... maybe you could try to parse each array only once.
Please add the following test case to Haskell:
This test case will invalidate several incorrect solutions.
Great kata !
Loading more items...