Ad
  • Custom User Avatar

    I found the solution, for my case, my counter was initialized outside of the function and I return the value of it when the condition in the question has been met.
    So when the tests runs the function the value of the counter stays the same after you called it for the first time, the test doesn't reset your counter. That's the reason why my kind of recursion doesn't work.

  • Custom User Avatar

    Probably you're doing it wrong, there are plenty solutions using recursion in javascript.

  • Custom User Avatar

    I'm using javascript, recursion function still doesn't work. It's frustrating.

  • Custom User Avatar

    It won't work there either if you call your function several times with different input values like in the tests.

  • Custom User Avatar

    used global variable as counting step on my recursion...didnt work
    but it works on jupyter notebook. Any help would be apperciated.

  • Default User Avatar

    Mr you should run in debug mode
    I had the same problem
    Check type of value probably you need some pars methods

  • Custom User Avatar

    You should ask on CW discord (check forum section on the left), faster response time there.