Unfortunely this is not a good solution, it's easy to implement, that's true but it's very slow. I tested it on a list of length 80 and k=6 and it took 188.6s whereas my solution took 1.77s
Did you check the "allow contributors" checkbox in the kata editor? I cannot acces the edit panel to update the python version with the module forbidder, right now (but, I guess it's because the kata is currently a draft). So other possibility: are you on codewars gitter channel? I could give it to you from there.
no, considering the task, you have to forbid the re module (or equivalent in JS), because we already have tons of katas that are asking for reimplementation of builtins and they are generally especially badly welcome. If you wanna have a kata that goes smoothly out of beta, there are things that it needs (those are generalities, some aren't problematic for yours):
good description
description matching the actual task (yeah, sounds weird to say this out loud, right? You don't imagine what we can see about that, from time to time! x) )
sample tests and meaningful ones (like, not only 2 tests if there are a lot of edge cases to cover)
enough fixed tests to cover most (possibly all) edge cases
random tests (without them, it's generally a "no go". Tho, for your kata, that will be way harder to build than the solution to the kata itself)
if there are supposed to be restrictions, they have to be fully enforced. That's generally a critical part, especially with JS and python.
be sure you're not building a duplicate or something too close to another kata (for instance, I can see stuff that are related in the "details" page, but I didn't check further since most are in JS and I don't do JS...)
original contents (in both meanings) are strongly encouraged
for your current matter (speaking about python), I have something that is working "not so badly" to forbid modules. I have some tweaks to add yet, tho (unnamed found some new holes in it today... x) ). About JS, I cannot help at all, but I know that's almost as bad as python (iirc there is a hack of "require" that is involved).
I will do that once the validation process is done. That being said, I am new to creating katas. What would be the best way to go about restricting built-in functionality? Or would this be better suited as a lower rated kata? I won't have much time to modify this kata until later today, but I would like to get this kata working properly if possible.
note: considering the number of users who already did it and ranked it, you even should unpublish it (after we got through the "validation" of the restriction process) and create a completely fresh one. Otherwise, the approval rank will be biased by a lot.
not good. summing twice.
Unfortunely this is not a good solution, it's easy to implement, that's true but it's very slow. I tested it on a list of length 80 and k=6 and it took 188.6s whereas my solution took 1.77s
Never knew about this module, very convinient though lol
holy crap this is the first time the top solution on a kata matches exactly what i did
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I just signed up for gitter and joined the channel.
Did you check the "allow contributors" checkbox in the kata editor? I cannot acces the edit panel to update the python version with the module forbidder, right now (but, I guess it's because the kata is currently a draft). So other possibility: are you on codewars gitter channel? I could give it to you from there.
Awesome! Thank you! I appreciate all of the feedback!
no, considering the task, you have to forbid the re module (or equivalent in JS), because we already have tons of katas that are asking for reimplementation of builtins and they are generally especially badly welcome. If you wanna have a kata that goes smoothly out of beta, there are things that it needs (those are generalities, some aren't problematic for yours):
for your current matter (speaking about python), I have something that is working "not so badly" to forbid modules. I have some tweaks to add yet, tho (unnamed found some new holes in it today... x) ). About JS, I cannot help at all, but I know that's almost as bad as python (iirc there is a hack of "require" that is involved).
I will do that once the validation process is done. That being said, I am new to creating katas. What would be the best way to go about restricting built-in functionality? Or would this be better suited as a lower rated kata? I won't have much time to modify this kata until later today, but I would like to get this kata working properly if possible.
note: considering the number of users who already did it and ranked it, you even should unpublish it (after we got through the "validation" of the restriction process) and create a completely fresh one. Otherwise, the approval rank will be biased by a lot.
you should unpublish it in the meantime (wow, my first message is pretty badly writen... x) )
Thanks for the feedback. I will modify the problem as soon as I can.