Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
OP solved it, closing
OP solved it, closing ~~
This was a tough nut to crack, but very satisfying to complete.
Is anyone else having issues getting this to pass in js? Both the recursive and the iterative solutions which are quite simple, timeout.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thank you again for your advice about reccursion, after taking a break I did some research which helped me understand where I went wrong and how to break out of the loop I created
because it is! ;)
here is what you're doing right now (try to firgure out what's the problem ;)
Why do you say thet the recursive function is incomplete?
edit: Okay, thank you for the help, it has been very informative, I was completely lost before
This comment is hidden because it contains spoiler information about the solution
hard (if not impossible) to tell as long as you don't format your code correctly so that it's "readable python" ;p (see here)
edit: I believe I got it. It's because you use reccursion, but "incompletely".
Thats what I don't understand, how can the print statement be in the correct location, but when I replace it for a return statement that is not in the correct place. I didn't make this post to say that anything was wrong with the code, but to ask for help from more experienced programmers, because the code works when tested in visualcodestudio
that just means you don't put your "return" at the correct place in your code.
As I said when I use return it shows the following:
Test Results:
thirt
Basic tests
None should equal 79
None should equal 31
None should equal 57
None should equal 71
None should equal 30
I changed it from return to print to see where where the error was occuring, but as I said, when I return the value it shows None instead of the values that would be printed and I do not understand why this is happeneing
Loading more items...