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.
Can you make it work with big numbers? How big? :)
loaded-icosahedron, that exercise requires another kata just to decode what it is saying xD
Попробуй на PHP, врядли пройдёшь первые два теста с этим простым алгоритмом =)
The classical implementation didn't work in PHP as it was keeping failing during stress tests. I had to come up with new ideas in order to make the algorithm more efficient and hoping that it will pass the stress tests. Even my last most efficient solution was failing on "testStressedRandom". So I decided to implement the same algorithm in C++.
I was shocked when I saw the other's solutions, basically copy/paste of the description of the problem, which obviously would be the first thing you would implement.
So, my question is this, why the PHP requirements related to efficiency are so high? Why the requirements for C++ are so low that even the copy/paste from the problem description will work?
Find any value in the sequence in milliseconds. E.g. with n = 2,140,000,000.
Anybody tried to complete this in PHP?
All the tests have been passed but I'm having issues with the last "testStressedRandom", it returns an error about memory size exhausted. I have tested my solution which runs in less then a few milliseconds and the memory peak usage is 443320B, which is not that much.
Could it be that the problem is within the "testStressedRandom" itself for the PHP version?