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.
Sorted! had to return the recursive call, a bit smarter now :D.. Cheers guys :)..
That test is
10E11
. I've removed it from all languages and updated description to indicate that tests will be up to10E8
.Well, exactly the same way how others did it with recursion! ;) Idea is to reduce the amount of identical recursive (or any other) calls and "merge" them somehow into a single one, no matter if it's done with recursion or not.
Hi, I wonder, if you send in input of a number that's 100000000000. How do you expect it to be solved via recursion ?
yep I guess I'm doing some basic mistake that I haven't figured out yet, but got some hints from you.. let me think about it a bit longer, problem must be on my side as no one else reporting this issue.. Thank you both, I'll confirm once solved :D.
You're probably not returning the recursive call to your function.
Solved?
Thank you for reply.
Nah, I have this inside my code..
So it's returning as well..
You're supposed to return the stuff which you consider as your answer, you're logging them right now.
What am I doing wrong? When I console.log the result is correct, but the test response is undefined :-/. Thank you..
Time: 941ms Passed: 0 Failed: 4 Exit Code: 1
Test Results:
Basic tests
Log
[ 6, 7 ]
Expected: [6, 7], instead got: undefined
Log
[ 0, 1 ]
Expected: [0, 1], instead got: undefined
Log
[ 0, 1 ]
Expected: [0, 1], instead got: undefined
Log
[ 2, 2 ]
Expected: [2, 2], instead got: undefined
Completed in 5ms
STDERR
Unhandled rejection TestError: Expected: [6, 7], instead got: undefined