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.
"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.
Which browser do you use? I had simmilar problem in firefox but I opened kata in chrome and I submited solution without problem
Please format your code with backticks (
```
) or indentation (4 spaces):or
That being said, did you have a look at the solutions? The one voted for best practise looks pretty much the same, altough more concise.