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.
thanks !
Prolog translation
While there is no
performance
, the input constraints are mentioned in description. With 10^5 input, the expected time complexity should be less than O(n^2). Your code looks to have O(n^2) because of operations like.splice
or.indexOf
nested in a loop.However, there was an issue raised about it below and seemingly O(n^2) should be accepted now? Maybe there are some inconsistencies between tests of different languages, that's up to the author to clarify.
Forked to fix description, approved fork.
Issue
tag is for the issues with a kata, such as broken test cases, incorrect descriptions etc. Next time please post aQuestion
.spoiler
flag, it is a guesswork to try to help you. Looking how there is noperformance
tag and my first naive solution passed in 2500 ms, my guess is you got infinite loop somewhere in your code.Help Execution Timed Out (12000 ms)
on_line(((1,1)))
should beon_line(((1,1),))
C translation
Actual test:
Reference solution needs improvement:
top solution got invalidated after spec update
Approved
Fixed in latest fork
Approved
Hmmm it seems like you didn't read the comment at the top of the JS test cases, let me copy paste it here:
I specifically mentioned Python as one of the language that this kata shouldn't be translated to.
Even if you (after reading this) have found a way to block the use of large integer in python, there might still be holes that you forgot to handle or there might be new holes added at later version of python. It would be hard to maintain in the future.
So, I'm sorry, I'll have to reject the translation. Thank you though for the time you put on creating it.
python new test framework is required. updated in this fork
Loading more items...