6 kyu
Find heavy ball - level: conqueror
531 of 1,050tiriana
Loading description...
Puzzles
Logic
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
C translation (author inactive)
This is a backport of the C translation for the master level of this kata.
This comment has been hidden.
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.
OCaml translation.
Please review and approve, thanks !
approved
Ruby 3.0 should be enabled.
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?
Ruby, Crystal and c++ translations kumited :)
All 9 are approved. Sorry it took so long. Thank you very much for translations.
No worries, cheers :)
@tiriana
,This kata isn't compatible with Python 3 because of
xrange
.Fixed. Thanks for reporting.
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?
I don't visit codewars so often lately. But are you saying python translations are broken in some way?
Andnsecond thing: when I was cresting this kąta, I wanted to have something like 'difficulty level' but codewars does not support it. So I went with three Katas so people can see that single parameter can change solution drastically. Of course, if you solved it for 'master' level, you'll get two lower levels for free.
Just like LDeleuran mentioned, it should be made clear what the
scales
object contains, how to use it and how to get the weight.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.
Thanks for feedback.
Description should read: "before the scale breaks" Done :)
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.
I changed scale object. I used the previous one as prototype, for backwards compatibility. Now scale has only one method -
getWeight(left, right)
. I also added some description about how to use the scale. I'm marking as resolved.