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.
Not sure you are still an active user here, but here we go .. your solution now works, after the random tests have been updated.
I still think the idea can work, but maybe not with this kata.
In my opinion, no.
As mentioned below: do one thing, and do it well.
Focus on obfuscating source code. Make sure there is interesting code to obfuscate.
( Other opinions are undoubtedly available. )
Dunno if you still care, but your code is timing out on single character inputs.
For whatever reason, on codewars inputs default to 255.
So for an input of a\0 you start with [97] [0] [255]
and your code just keeps copying cell 3 to cell 2 cause it never hits the EOF marker.
don't forget the size of the problem here: 4x4 is super tiny.
This is actually the reason I created this kata in the first place. After solving the 'insane' version and looking at the official solution, I realized it allowed solutions based on algorithms with far from optimal time complexity. So I created this one (the JS version only, the Python translation is not mine), so that people figuring out the actual best way to compute this could earn more points.
(So, long story short, the 'free' score increase is actually the 'insane' version, not this one ;-) .)
I ran your code, and I am getting an error "Cannot convert string to float", but it isn't triggering the cheat thing... (Also, check discord)
Thats better :D
Actually
[+]
is faster for values in range [129, 255] and[-]
is faster for values in range [1, 127].0 and 128 are indifferent. So you can prefer one over the other only if you have an idea of your values' distribution. In real cases,
[-]
seems better in most cases, as all ASCII characters are in range [0, 127].are you using a var/function name or a comment containing the string
eval
...?edit: seems not...