Ad
  • Custom User Avatar

    it is recursive so solution is the function name and calling itself again inside

  • Custom User Avatar

    Does anybody care to explain this? I don't see where the function iterates through the string. I see it returning the larger of two options, digits[0, 5] and ... this "solution(digits.substr(1)". digits.substr(1) means go from [1] to the end of the string. I don't know what the word solution is doing. Google didn't turn up a method or anything so it looks to me like a variable instantiation.

  • Default User Avatar

    When I tried to complete this kata first time in Java version,I used "double type" several times and failed when submitted.
    I thought and realized,I had to change my mind and use "double type" only once.
    As the description says:truncate at last.
    The math in this kata is easy,but the process of thinking is cool!

  • Custom User Avatar

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

  • Custom User Avatar

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