Ad
  • Default User Avatar

    This is smart approach but note any recurrsion without tail recussion approach can be risky. In this case it fine because before the recurrsion could fail on stack, the length of the number would fail the function