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.
Hhahaha what the evil author, the description is completely misleading
+1
(javascript),same timeout.LoL
Fixed, tests also refactored to be maintainable (seriously they were a catastrophe before).
Python random test generation can crash due to overflow.
Cannot reproduce.
Cannot reproduce in Python.
If you aren't passing the non performance tests essentially instantly you have the wrong approach.
There is only one working approach in Python and it isn't that.
If C lets that through then the tests need to be hardened significantly.
not sure if it's the right answer, but you are assuming that the Codewars' servers are as fast as your computer (perhaps more accurately, that the computing power they allocate to running your code is on par with the one you have on your own machine). 3.5s vs 12s is not that big of a difference, it's roughly the same order of magnitude. usually, when you start wishing you had more computing power, it's time to optimize your algorithms and data structures first
(Ruby) I don't get it - the fixed tests and the 100 random tests finish in about 150ms, but I get a timeout for the performance tests. If I take the 100 performance test arrays and hard-code them in my script locally (i.e. I run the script on my machine), then that alone finishes in 3.5s.
This is well below the 12s timeout. How can this be?
don't go through the array completely, instead split it into 2 parts, and process them separately, both for reading, copying and adding. i hope i helped
This comment is hidden because it contains spoiler information about the solution
My solution still works, and passes tests in around 5 seconds. Your solution with numpy and 4 lines is too slow. You are hereby advised to git gud, improve performance of your solution, and be more mindful about the language used here. Good luck.
no, it's not. thousands of coders have solved in in your language alone. your code is the problem, guy
Loading more items...