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 didn't realize there's alr a 2nd issue raised below which puts this in draft automatically. Anyhow, yes it is, the same solution can be used with a minor tweek on one of the operators (talking about binary vectors one)
TBH: I'm really surprised this one managed to pass 50% upvotes, considered it's one of those done-to-death tasks on the site!
EDIT: even if you think it is not, this one linked by Benjamin below plus the combination of above can definitely be concluded as a dup
I will add random tests, thanks for pointing out.
I was talking about that huge chunk of fixed tests called random tests in this kata. But yeah I did not mean that they had to remove the actual random tests (as I pointed out in another comment). My point was that if they have a way to generate random tests in their kata they can remove all those """""RANDOM TESTS""""" from the kata
@ejini: don't take as argument the workload for maintainers. It has nothing to do here. Just: is it a duplicate or not?
The hamming distance is used for categorical variables and they are only equal to each other for binary vectors.
No random tests. (I don't think yLaWy meant you had to remove the random tests, but rather that you should fix them...). I had a full hardcoded solution that passed all the tests, could not validate it because just at this moment the kata passed to draft.
Really... I submitted in less than a minute and that was enough for you to put it to draft :P
You removed the wrong "random tests" though, I was talking about that huge chunk of fixed tests under the "Random Tests" name
There's alr deduplication on
hamming distance
noted down here (3 katas to be precised) So adding a fourth one is just increasing extra workload for content maintainers.Function name is edited, thanks for pointing out.
Yeah, sorry. Well, in an approved kata it's always better to state the language even if it has only one language available because more langauges can be added later and it is easier for maintenance, but not here, sorry!
Random tests are removed, thank you for pointing out.
But... there is only one language
Edit: it's all good akar, no problem
I'd write in the description "In this Kata you are given two vectors and you should compute 'Manhattan distance' " or something similar to this.
I had to change the name of the function from "distance" to "manhattan_distance", otherwise the tests didn't work.
Please say which language is affected.
Edit: sorry, I had not seen this kata was only available in one language and still in Beta. My bad...
Loading more items...