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.
true 10 years ago, still true
There is a bug in this one, it fails for "[02-20]".
nnice!
You should credit this to the source, though... (https://en.wikipedia.org/wiki/Levenshtein_distance)
brilliant
Could you walk me through this in a conceptual step-by-step way? EDIT: oh, I see, when you do
this & 111...
you're essentially using JS to give you the answer directly, and then padding it on the next line. Clever.To be more specific, they are presented as signed 32-bit ints when using bitwise operators.
This is awesome but will go wrong while I wanna get a string of length >= 32. In JavaScript, numbers are storaged with 64bits but presented with 32bits, so 1 << 32(or higher) is '0...000' not '1...000', which causes the error.
I think some people have cheated on this kata without realising. I think more test cases are needed for remove, e.g. remove node from high up on a deeper tree (more than a couple levels below it).
fantastic
I love this, it's a great approach to solving this problem. Compile to Javascript and run it through eval(). Neat! Potentially quite efficient too if the Javascript interpreter gets to compile it, not that these type of languages are ever meant to run fast.
I'd say this kata is already way too easy for 3 kyu, and there's no simpler version of this problem that would be interesting.
The tester for this problem appears to let through invalid solutions. Add a test case such as (-3).twos(5) === '11101'.
This doesn't work!!! Try e.g. (-3).twos(5) you get 11111
This also helps check if people have used decodeURI and encodeURI correctly. N.B. the path after the hostname, the parameter name and the parameter value can all have URI encoded characters in them! I reckon nearly all the current solutions won't work at all.
Loading more items...