288 views
1 votes
1 votes

Please log in or register to answer this question.

Related questions

5 votes
5 votes
1 answer
1
srestha asked Aug 6, 2018
550 views
How will this function run for the input 123 (where str points '123' and n=3)?in myAtoiRec(int *str,int n) { if(n==1) return*str-'0'; return(10*myAtoiRec(str,n-1)+str[n-1...
2 votes
2 votes
4 answers
2
0 votes
0 votes
1 answer
3
24aaaa23 asked Oct 1, 2023
257 views
int foo(int n){if(n<3)return 1;else return (foo(n-1) + foo(n-3) + 1);}Let ‘m’ denote the number of invocations of function foo and ‘n’ denote the return val...
3 votes
3 votes
3 answers
4
Diksha Aswal asked Jun 27, 2017
1,005 views
int fun(int n) { int s=0,i; if(n<=1) return 1; for(i=1; i*i<n; i++) s+=n; return fun(n/4)+fun(n/4)+s; } what will be the time complexity, returning value and no. of recur...