Ad
  • Custom User Avatar

    I looked at your code and you're using return on its own - this will return "None" as a default value. You need to return 0 instead.

    However, this Kata cannot be solved using recursion since the input parameter can go as high as n=50000, meaning it needs 50000 recursion calls, which uses too much memory and will lead to a memory error.