Ad
  • Default User Avatar

    Yep, I knew my own solution was over-complicated, but I just couldn't get my thoughts straight haha. Great solution you present here! :)

  • Default User Avatar

    It was nowhere said that epsilon should be less than 1.0:-) Nevertheless I modified the random tests. Thanks!

  • Default User Avatar

    In the random test cases it looks like sometimes an epsilon greater than 1.0 was passed in. Is that a bug in the testing suite for this kata? Or am I mistaken?

    //edit: I was using this kata with Golang.

  • Default User Avatar

    The sorted key parameter receives a tuple from weight_key which contains two values: First the weight-value, and second the string value itself.

    In your example using "11" and "20000" the keys are thus (2, "11"), and (2, "20000"). Hence the weigh-values are equal, but the string values differ and are sorted accordingly.

    I hope this clarifies it.