Ad
  • Custom User Avatar

    True, but a power or square root operation is a very expensive operation.

  • Custom User Avatar

    I wrote the explanation keeping in mind a recursive solution is being attempted.
    Nevertheless, I've worded it slightly differently, but I don't know whether it is sufficient.

  • Custom User Avatar

    On step 4, the description refers to n, as if it's still the initial number given as an argument. However, it's actually the result of the previous computation.

  • Custom User Avatar

    Description is too vague. The coder spends more time trying to guess what the author wants. A lot of information is missing or confusing. The discussion gives most of the details that still need to be fixed.