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.
Sorry for the typo, I have correct the comment. Thanks.
In Lua,
13 ^ (30 + 13 ^ tower(13, 2, 30))
would overflow and can't produce the correct result. There's also nopowmod
function in Lua. To be consistent with the Python test cases, I left a comment here to help users notice the cycles.With Python moving to JIT, counting bytecode instructions probably isn't sustainable. I was thinking of HW perf counters, like the ones accessible by running 'perf stat' on Linux.
counting bytecode instructions, you mean?
If codewars had a feature to run with perf counters and count the number of instructions executed, that might be a better way to restrict the solutions to something more efficient O() wise.
This solution shouldn't pass the tests, in fact, but it occasionally may slip through the random tests (I did my best to forbid unwanted approaches, but I'd need more than 12s to reliably forbid the different kind of undesired approaches)
Yes the array insert promotes it to O(n^2), but switching from a python list to array('q') made it fast enough to pass the testcases at least.
yes, it will. The test out-put will look like this:
In red, obviously, so it's hard to miss ;-)
Could you explain this:
parse_regexp('(abc)d') != parse_regexp('abcd')
I have all tests passed except two of them. Both look like this simplified one:
((ab(cde))fg) = (ab(cde)fg) should be ((ab(cde))fg)
At the same time ((abc)) => (abc) ?
done! check the new branch. now it will reveal the name of the answer if the test is wrong AND mysteryInv and mystery both pass all other tests. hope it's all good and you can now approve :D
okay! i'll make the change regarding the revealing of the name. in terms of when it's tested, do you not see its test wrapped with if(timeToTestName)?
Thanks. The last fork is approvable.
OK, thanks, I wrote some comments and add a ramdom set of test to make it closer to the python version
I was going to make this exact comment!^^
(But I Ctrl+F "nap" before, hence finding yours; so ^^)
A digit is a single character representing the symbol
[0-9]
.289
is not a digit, it's a number that consists of 3 digits. Therefore,[12,156,111,568]
is not an array of digits, it's an array of numbers. "array of single digits numbers" would be redundant.Loading more items...