I am not able to understand what happens in calls stack and why the first statement that appears on screen doesn’t have value n=3
I am not able to understand what happens in calls stack
i hope this recursion tree helps u understand the stack states
u will learn better
if u try making them on pen paper
for each state right 1 2 3
these 3 steps have to be carried out
1 is recursivecall for n-1, s,d , h ( read as
n-1 elements from source to helper using destination )
2. then print n th element to s->d
3. recursive call n-1 , h , s , d ,( read as
n-1 elements from helper to source using destination)
