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.
It's not mentioned in the description or anti-cheat fail message that any
import
at the outmost scope will trigger the anti-cheat test. It definitely should be mentioned (and should also mention that importing inside inner scope, e.g inside the function, is fine).How can I know how to improve code performance in order to dont get timeout (python)? Can someone help?
Consider what you want in terms of performance. Then test for correct Big-O time complexity instead of having compliant solutions take 11 seconds. Succeeding should take on the order of
1
second for compliant solutions, while uncompliant solutions should time out consistently.Please read the chapter on performance testing in the documentation carefully. Get help if you have problems understanding or implementing performance requirements. Beware of requiring micro-optimisations!
According to the below issue, Python has this problem; JS has it as well. The example solution takes 6 seconds, both submitted solutions take 11 second. This is indicative of too many not large enough tests, though there is something to be said for not too few tests.
Python tests are not well balanced - my solution passes them in
9.5-10 sec
but still times out once in 10 or so attempts.Also, why on earth does testing take so much time? In general case, a valid solution shouldn't almost time out just to pass the tests, even if there're performance requirements.
I am getting the error: "living_room should be the only name in the global scope, and it should not have a state," but I haven't added any additional variables to the code, inside or outside of living_room.
Can someone give me a hint as to what this might mean?
Why are we supposed to implement a curried function? Other than "I want it to be so" of course.
There are at least three other Roman numeral encoders. Extending existing logic by extending the digits without changing the logic itself, and passing the digits as an argument instead of using the classic ( literally :P ) predefined
I, V, X, L, C, D, M
, does not really add novelty. It's just more of the same.Duplicate.