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.
The examples in the kata description are misleading because they only contain a very limited subset of test cases (where text is either only added or only deleted, not both). You should add some human readable examples with text both added and deleted to clearly show what you are asking for. For example something like: findDifferent("Hello John, how are you?", "Hello Jane, how are you?"). I would also suggest adding a few reasonable human readable strings to the test cases rather than using only purely random strings or concatenations of single words.
Riddle me this random test:
Why does the reference solution insist on pointlessly removing and adding all those
2
s? That's not "the most efficient, succinct way".It is not explained how to handle cases with multiple possbile answers.
{index: -1, addedText: "", deletedText: ""}
makes no sense. If nothing was changed, the output should benull
.edit: btw, ti seems you ddidn't get how the ranks are working on cw: 1 kyu isn't the easiest difficulty, it's the hardest.
hi,
No random tests.
( A gazillion fixed tests is a worthy effort, but not a replacement for random tests. )
What would be the expected return value for identical strings?
How do you expect ambiguities to be resolved?
In general, do not rely on examples - specify that sh*t.