Awesome q2a theme
+1 vote
26 views
Void f(int n)

{

if(n<=1)

     return;

f(n-1);

f(n-1);

}

Q.1 ) what is total no of recursive calls in f(n) ?

Q.2 ) what is the total no of calls in f(n) ?
in Algorithms by (45 points) | 26 views
0
$2^n$ total recursive calls and $n$ distinct calls.
0
I get( 2^n) -1 for total recursive call

And (2^n-1)-1 for total calls.

Is this true or not?

Please log in or register to answer this question.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
9,092 questions
3,152 answers
14,579 comments
95,935 users