6 kyu

Find heavy ball - level: conqueror

531 of 1,050tiriana
Description
Loading description...
Puzzles
Logic
  • Please sign in or sign up to leave a comment.
  • HartlIKS Avatar

    C translation (author inactive)

    This is a backport of the C translation for the master level of this kata.

  • Axma Avatar

    This comment has been hidden.

  • ElektrazCode Avatar

    There is one use case that I do not understand. How can the left half and the right half of the array weigh the same if there is one ball heavier on either sides?? When I call the scales.weight function comparing elements 0-3 and 4-7 in some cases I get 0 which means they weigh the same, shouldn't the sum of ball weights with one heavier be more than the sum of the rest that weigh the same. This is driving me crazy. Can someone explain it to me please? Thanks I really appreciate it.

  • Glinator Avatar

    OCaml translation.

    Please review and approve, thanks !

  • user9644768 Avatar

    Ruby 3.0 should be enabled.

  • yordanovevgeni Avatar

    Tests passed but when I attempt to submit I got this: "Time: 2284ms Passed: 1 Failed: 0 Exit Code: 132"

    What "Exit Code: 132" means? Maybe not all tests passed?

  • GiacomoSorbi Avatar

    Ruby, Crystal and c++ translations kumited :)

  • zebulan Avatar

    @tiriana,

    This kata isn't compatible with Python 3 because of xrange.

  • marexv Avatar

    Due to error on Python example of "Find heavy ball - level: novice" which can only be solved with 2 weighings and not 4 you can copy paste that code here and solve this kata in seconds. Same works vice versa. This means taht by solving the hardest kata, you can get two others for free, which feels wrong for people trainig, but it is also kind of unfair because you effectively submit same kata 3 times and just change one parameter. Is it possible to change examples in a way that code won't be interchangable?

  • irobert91 Avatar

    Just like LDeleuran mentioned, it should be made clear what the scales object contains, how to use it and how to get the weight.

  • LDeleuran Avatar
    • Description should read: "before the scale breaks"

    • It should be clear that you can use the scales.weight property

    • it should be clear that the pans should always be arrays - single numbers are not allowed.