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.
This comment is hidden because it contains spoiler information about the solution
you helped me. Thanks
And I like how I was stuck this whole time until I read your comment. My code kept getting timed out because of these summations.
Thanks mate !
My bad, in JS, arrays can contain up to 800,000 elements, I guess I must have looked at the tests in another language. However, the rest of my original response remains valid.
i used console.log to show me the array that given and it was so long in the end writed "... and 162821 item more"
check the photo https://ibb.co/sPSvm56
There are no inputs with length greater than 60,000 . However, if your code times out, you must find a more efficient approach. Naive solutions won't pass this kata.
i made a code its work but with last test its give me timeout because the input is like 200k numbers any idea how to fix it?
Made three solutions and only the last was sucsessful during basic tests, took several hours in two days to find out the most optimized one :)
I like how the kata leads you to a suggestion (summing) only for it to be the most inefficient way of solving the problem :)
I agree, some of the Kata's are really easy in some languages and rediculously hard in other langauages.
It is a shame that kata ranks can be language dependent.
@Adrian1707 Well, Thanks Adrian for posting
I'm doing this in SQL and it's not as clear from the description what the end result should be and how the test runner works.
I do have the answers but they're formatted as a single column table. When I attempt to return a single value then the tests fail because it contradicts what is expected in another test.
So just to confirm: For the SQL version are we expected to return a final value, and if so then I think the test runner has to change to accomodate this
Check the scope of all your variables. Behaviour like this usually indicates some value is persisting between method calls.
Why do my test cases pass on an individual basis but fail as a group? My logic is correct and every one of them passes, but when I run them all together there seems to be a weird ordering dependency going on
Loading more items...