Retired

Musical Triangle - Find the possible range of frequencies (retired)

Description
Loading description...
Algorithms
  • Please sign in or sign up to leave a comment.
  • Voile Avatar

    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 or None should be returned. (Also half-frequencies on both sides should be tested for this edge case.)

  • Voile Avatar

    It is not mentioned that the returned frequency range should also be integers, only the inputs.

  • mauro-1 Avatar
    • Actual and expected are swapped in random tests

    • Wrong results in random tests, .eg.:

      musical_triangle(1467, [(1736, 'closer'), (273, 'further')])
      

      Expected result: (1601, 4000), but 1601-1467 = 134, 1736-1601 = 135 -> 1736 is not closer.

    • cestxvcdim Avatar

      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)

      Issue marked resolved by cestxvcdim 2 years ago
  • rowcased Avatar

    for what its worth, the triangle is a poor choice of instrument for your description because it has no definite pitch...

  • dfhwze Avatar
    • incomprehensible specs for users that aren't acquainted in the field you describe
    • random tests expect None all the time