Ad
  • Custom User Avatar

    Is mutating an original string a best practice?

  • Default User Avatar

    Both string and algorithm are included in the test cases already. So we have access to them via the code that runs our code.

  • Default User Avatar

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

  • Custom User Avatar

    Love your avatar Mr. Storm Pandaren :)

  • Default User Avatar

    Hi, the same problem here, in Dart.
    Expected: "h(t) = -16.0t^2 + 17.88t + 51"
    my return: "h(t) = -16.0t^2 + 17.880t + 51.0" wrong

  • Default User Avatar

    C++ translation - please approve if ok.

  • Custom User Avatar

    I think that the string is not trimmed in random tests:
    Expected: equal to muIcKiTXBKIdGdTwFMFnAxdtEUrRClWvsMPdJxay lPduzTkLMLxay
    Actual: muIcKiTXBKIdGdTwFMFnAxdtEUrRClWvsMPdJxay lPduzTkLMLxay

    After adding char in front and in end
    Expected: equal to PIPay
    Actual: PIPay

  • Custom User Avatar

    Your function should return, not print to the console. Also your code is losing punctuation marks.

  • Default User Avatar

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

  • Default User Avatar

    Yep, thanks :)

  • Default User Avatar

    C#, yes? Fixed now.

  • Default User Avatar

    Thers is still problem with expected formatting and its description.

    "EVERYTHING, including values in the equations appearing as coefficients, must be rounded to THREE decimal places. However, if the value is whole, only show one decimal place (for example => -16 becomes -16.0, not -16.000)" implicates that there should be 3 or 1 decimal place, but I've got error:

    Expected string length 31 but was 32. Strings differ at index 23.
    Expected: "h(t) = -16.0t^2 + 23.84t + 64.0"
    But was: "h(t) = -16.0t^2 + 23.840t + 64.0"
    ----------------------------------^

    EDIT:
    My next attempt, with 1, 2 or 3 decimal places:

    Expected string length 28 but was 30. Strings differ at index 19.
    Expected: "h(t) = -16.0t^2 + 0t + 161.0"
    But was: "h(t) = -16.0t^2 + 0.0t + 161.0"
    ------------------------------^

    So it excpected no decimal places now.