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.
I thought it was too easy, then I thought it was wrong. Now I see that this will take a bit more thinking.
The description says "the Levenshtein distance between two words is the minimum number of single-character edits", how is deleting "na" a single character edit?
So to go from "nayvyedosf" to "sjxen" you are required:
and then from 8) to 10) delete "osf"
I was stupid.
To get from "nayvyedosf" to "sjxen" you could delete "na", substitute "yvy" with "sjx", substitute "d" with "n" and delete "osf". That's 9 edits, the test is correct.
I agree, I wish they'd show you the test cases. You can simulate it by simply printing the input for each test case before the case fails or passes, and address them one at a time as you pass each successive test case, and the next one prints.
Only lowercase letters allowed. Your solution allows uppercase as well, that's why it fails.
This comment is hidden because it contains spoiler information about the solution
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 don't think it's a great idea to hide the test cases, especially if it turns out that the test cases are wrong. Aside from that, hiding the test cases is an act that totally contradicts a TDD approach. The TDD approach is, of course, based on total disclosure of what the tests are about.
This comment is hidden because it contains spoiler information about the solution
"Unknown Error" is an unknown error. It's usually not kata/solution related. However, your current solution is far too slow, its worst-case runtime is O(n!), and it also needs O(n! * n) space, so you probably run out of memory.
This comment is hidden because it contains spoiler information about the solution
I got "10 should equal 9" on Test #5 when I submitted my run.
This is because assertion #5 is wrong. It should say
and absolutely not
I opened Firefox :)
Which browser do you use? I had simmilar problem in firefox but I opened kata in chrome and I submited solution without problem
Loading more items...