retagged by
1,581 views
0 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

2 Answers

2 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 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
Position:
Show:

Related questions

7 7 votes
3 3 answers
2.8k
2.8k views
bts asked May 29, 2018
2,826 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 0 votes
0 0 answers
719
719 views
hacker16 asked Apr 28, 2018
719 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 11 votes
1 answers 1 answer
4.4k
4.4k views
dd asked Oct 31, 2016
4,421 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...
4 4 votes
1 1 answer
1.2k
1.2k views