0
SUM UP THE ALL INTEGER IN THE NESTED ARRAY LIST
What is the difference between these two functions. They both have the same algorithm but different output. Although I used return statement in the first function, while I print the second function out. Could there be any logic behind this? If there is, can someone please explain https://code.sololearn.com/Wbc8mGwye0Si/?ref=app
2 Antworten
+ 4
the algorithm used is qualified as 'recursive', meaning that it call itself to resolve... so it requires that it return the result to work properly (you could log result if you want, but you need to return result or modify algorithm to make it linear^^)
0
Thank You visph, now everything make sense.