Ad
  • Default User Avatar

    Is there a reason this isn't being tested within some tolerance? I've solved this on Python without issue, except that for ~1-5 random test cases I'm off by 1/1000 which makes the rounding break the other direction(e.g. 0.444 => 0.44 vs 0.445 => 0.45).

  • Default User Avatar

    I'm new to golang and I don't understand how this solution works. Doesn't i track with the index of arr? So i, v := range arr[1:] would yield {1, arr[1]}, {2, arr[2]}, etc. What am I misunderstanding?

  • Default User Avatar

    I loved this kata! At first I thought it was trivial, but when you stated it could be solved without loops I got interested. It took me the better part of 30m to work it out (my math is rusty), but it was a lot of fun. Thanks for sharing it!

  • Default User Avatar

    The return type for the function is incorrect in golang. It should be int64 rather than float64. Thankfully changing this allows the code to pass the tests, but it's incorrect by default.