Ad
  • Custom User Avatar

    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

  • Custom User Avatar

    I will add random tests, thanks for pointing out.

  • Custom User Avatar

    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

  • Custom User Avatar

    @ejini: don't take as argument the workload for maintainers. It has nothing to do here. Just: is it a duplicate or not?

  • Custom User Avatar

    The hamming distance is used for categorical variables and they are only equal to each other for binary vectors.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Really... I submitted in less than a minute and that was enough for you to put it to draft :P

  • Custom User Avatar

    You removed the wrong "random tests" though, I was talking about that huge chunk of fixed tests under the "Random Tests" name

  • Custom User Avatar

    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.

  • Custom User Avatar

    Function name is edited, thanks for pointing out.

  • Custom User Avatar

    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!

  • Custom User Avatar

    Random tests are removed, thank you for pointing out.

  • Custom User Avatar

    But... there is only one language

    Edit: it's all good akar, no problem

  • Custom User Avatar

    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.

  • Custom User Avatar

    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...