Retired
Musical Triangle - Find the possible range of frequencies (retired)
Loading description...
Algorithms
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.
What is the interval type of the diapason? Closed or open at each side?
Related to the above: there should be an edge case where the result is of the form
(x, x)
, and depending on the answer above, either this orNone
should be returned. (Also half-frequencies on both sides should be tested for this edge case.)thx for advice, fixed
It is not mentioned that the returned frequency range should also be integers, only the inputs.
added in description
Actual and expected are swapped in random tests
Wrong results in random tests, .eg.:
Expected result:
(1601, 4000)
, but1601-1467 = 134
,1736-1601 = 135
-> 1736 is not closer.fixed this problem by float numbers (now 1601.5 - 1467 = 134.5, 1736 - 1601.5 = 134.5 -> equal, in this way closer or further have no sense)
for what its worth, the
triangle
is a poor choice of instrument for your description because it has no definite pitch...thx for advice, fixed
None
all the timesolve a problem with random tests, thx
But what can I do with first issue?
I think it would be good to have a worked example. I tried reasoning out the problem but I still can't figure out how the closer/further info affects the range. I do not even know what a "diapason" is.