retagged by
1,034 views
0 votes
0 votes
Identify the false statement a. When a module calls a subroutine recursively ,in each call , all of the information is popped in the same order when sub routines are terminated one after another and finally the control is returned to the calling module b. A recursion algorithm has two elements: each call either solves only part of the problem or it reduces the size of the problem
retagged by

2 Answers

2 votes
2 votes
I think the option A is false . and second one is right .
The first statement is false because all the calls are pushed in the same order while the popping is done in  the reverse order . so the option  a will be wrong . and statement b can be right about the recursion because yes the recursive algorithms either decrease the size or solve it completely.
0 votes
0 votes

When a module calls a subroutine recursively ,in each call , all of the information is popped in the same order when sub routines are terminated one after another and finally the control is returned to the calling module  This is false ..

But the second statement A recursion algorithm has two elements: each call either solves only part of the problem or it reduces the size of the problem is not correct.

Using recursion increases the size is program.It takes  extra stack space.

edited by

Related questions

7 votes
7 votes
3 answers
1
bts asked May 29, 2018
1,901 views
Why is recursive equation of following code $T(n)=T(n/2)+O(1)$, not $T(n)=8*T(n/2)+O(1)$? int x=0; int A(n) { if(n==1) return 1; else { X+=8A(n/2)+n^3; } return X; }
0 votes
0 votes
0 answers
2
hacker16 asked Apr 28, 2018
483 views
What is the max height of recursion tree of recurrence $c(100,50)$?here, the recursive function is defined as$c(n,k) = c(n-1,k-1) + c(n,k-1)$terminating condition$c(n,n) ...
11 votes
11 votes
1 answer
3
dd asked Oct 31, 2016
2,943 views
In the tower of Hanoi $x , y , z$ are the positions and we are to move 10 disks from $x$ to $y$. What are the $128$th and $768$th moves ?(A) $x\rightarrow y$ and $x\right...