Hi everyone,
We all face dificullity in coding recursivly, maybe most of new codders and CS students. However, my question today is related to How many number of execution been made by the recursive method. Which I think a bit tidious.
I'll be updaing this article with new questions any time I face a new problem.
Anyway, @Tanyawin suggest, is to learn scheme languge since everything there made by recursion. (loops,etc) But I think it needs some times which I don't currently have since we're hitting the exams door soon.
**My question is: when you invoke a recursive call inside the while loop how many times it actually executing. I don't seem to be able to visualize it.
**
e.g.
while(i < m(k-1)){
//anything here
sum = sum + 2;
}
I do see a k-1 times calls but what happens next? will each one of the calls do the same thing.... can't visialize it.
will continue adding more question later on...
Thanks guys!