Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This kata is asking you to find the maximum length difference between any two strings within two lists. I don't think this is a spoiler because I just reworded the "pseudo code".

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    It's not the prototype -- you're right. The 306 people most likely changed the values in the test case. I can pass this kata by changing that last test case from { 2, 4, 3, -4.5 } to { 2, 4, 3, -4 }.

  • Custom User Avatar

    I think there's a bug using C++:

    To get the correct output for the 3rd test cast, the prototype for the averages function needs to be std::vector<double> averages(std::vector<double> numbers) not std::vector<double> averages(std::vector<int> numbers).

    If you make the fix, you get this compilation error:
    -isystem /runner/frameworks/cpp error: no matching function for call to 'averages'
    std::vector actual = averages(testInput);
    ^~~~~~~~
    note: candidate function not viable: no known conversion from 'vector' to 'vector' for 1st argument
    std::vector averages(std::vector numbers)
    ^
    1 error generated.

    Edit: Also, the question asks to compute the averages for a list of integers and the third test case has a float/double in the list (from the perspective of c++/c).