Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged recursion
16
16 votes
1
1 answer
2.1k
2.1k views
GO Classes CS Test Series | Mock GATE | Test 4 | Question: 30
Consider the following function:What is the cost in time in the worst case as a function of $n$ of mystery $(m, n)?$. Assume $m>0, n 0$.$\theta(\log n)$$\theta(n \log n)...
GO Classes
2.1k
views
asked
Jan 19, 2023
Algorithms
goclasses_cs_mockgate_4
goclasses
algorithms
recursion
time-complexity
one-mark
+
–
15
15 votes
2
2 answers
1.9k
1.9k views
GO Classes CS Test Series | Mock GATE | Test 4 | Question: 51
What will be the output of following program?Assume that all necessary libraries are included.void myfunction(char *s, char *t) { int i = 0, n = 0; char p; n ...
GO Classes
1.9k
views
asked
Jan 19, 2023
Programming in C
goclasses_cs_mockgate_4
goclasses
programming
programming-in-c
recursion
pointers
two-marks
+
–
11
11 votes
2
2 answers
1.5k
1.5k views
GO Classes CS Test Series | Mock GATE | Test 4 | Question: 52
Consider a following recursive function $\textsf{f()}.$#include<stdio.h int f(int *a, int n) { if(n <= 0) return 0; if(*a % 2 == 0) return *a + f(a+1, n-1...
GO Classes
1.5k
views
asked
Jan 19, 2023
Programming in C
goclasses_cs_mockgate_4
goclasses
programming
programming-in-c
recursion
two-marks
+
–
1
1 vote
1
answers
1 answer
1.4k
1.4k views
Ace Test series |C programming | What will be the output of the following program ?
What will be the output of the following program ?answer is 8 but I am getting 5, please explain where I am wrong
abhinowKatore
1.4k
views
asked
Jan 18, 2023
Programming in C
programming-in-c
recursion
+
–
0
0 votes
4
answers
4 answers
1.0k
1.0k views
Self Doubt
A recursion program without a terminating condition will provide infinite output. True/False?
Aryanzzzz
1.0k
views
asked
Jan 16, 2023
Algorithms
self-doubt
algorithms
recursion
+
–
0
0 votes
0
0 answers
1.2k
1.2k views
C programming
What will be the return value of the below function, if it is called a sample(4)? int sample(int x){ if( x == 0 || x ==2) return 1; return (sample( x) * (x ));}
abhinowKatore
1.2k
views
asked
Dec 5, 2022
Programming in C
programming-in-c
recursion
bad-question
+
–
0
0 votes
0
0 answers
585
585 views
Best Open Video Playlist for Recursion Topic | Programming
Please list out the best free available video playlist for Recursion from programming as an answer here (only one playlist per answer). We'll then select the best playlis...
Misbah Ghaya
585
views
asked
Aug 16, 2022
Study Resources
missing-videos
free-videos
video-links
go-classroom
recursion
+
–
1
1 vote
2
2 answers
1.6k
1.6k views
Recursion
#include <stdio.h int fun(int num) { while(num>0) { num=num*fun(num-1); } return num; } int main() { int x=fun(8); printf("%d",x); ret...
ryandany07
1.6k
views
asked
Aug 15, 2022
Programming in C
programming-in-c
recursion
+
–
1
1 vote
2
answers
2 answers
431
431 views
ISI 2019 | PCB CS | Question: 12
You can climb up a staircase of $n$ stairs by taking steps of one or two stairs at a time.Formulate a recurrence relation for counting $a_{n},$ the number of distinct way...
admin
431
views
asked
Aug 8, 2022
Algorithms
isi2019-pcb-cs
descriptive
recurrence-relation
counting
combinatory
recursion
+
–
5
5 votes
3
3 answers
1.1k
1.1k views
GO Classes Scholarship 2023 | Test | Question: 17
Consider the following pair of mutually recursive functions.int f(int n){ if (n==0) return 1; return f(n-1)+g(n-1); } int g(int n){ if (n==0) return 1; return g(n-1) - f(...
GO Classes
1.1k
views
asked
Aug 6, 2022
Programming in C
goclasses-scholarship-test1
goclasses
programming
programming-in-c
functions
recursion
multiple-selects
two-marks
+
–
3
3 votes
3
3 answers
1.0k
1.0k views
GO Classes Scholarship 2023 | Test | Question: 27
What will be the number of recursive calls for $\textsf{mystery(5)}$ including the first call?void mystery(int n) { if (n == 0 || n == 1) return 0; mystery(n-2); printf("...
GO Classes
1.0k
views
asked
Aug 6, 2022
Programming in C
goclasses-scholarship-test1
numerical-answers
goclasses
programming
programming-in-c
recursion
one-mark
+
–
4
4 votes
1
1 answer
1.0k
1.0k views
GO Classes Scholarship 2023 | Test | Question: 28
What will be the output of the following program?#include<stdio.h struct _go{ char b[20]; char *a; struct _go *c; }x = {"GATE", "2023", x+1, "GO", "Classes", x}, *p = x;...
GO Classes
1.0k
views
asked
Aug 6, 2022
Programming in C
goclasses-scholarship-test1
goclasses
programming
programming-in-c
structure
recursion
two-marks
+
–
0
0 votes
1
1 answer
1.3k
1.3k views
Recursive function
Consider the following recursive function which is used by dynamic programming. T(n) = { 0; if n<1 1; if n=1 T(n-1)+T(n-2)+1; if n>1}Assume ...
Manisha Jaishwal
1.3k
views
asked
Aug 6, 2022
Programming in C
recursion
dynamic-programming
+
–
0
0 votes
1
1 answer
824
824 views
NIELIT 2021 Dec Scientist B - Section B: 12
Which of the following methods can be used to solve the Knapsack problem?Brute force algorithm RecursionDynamic programmingBrute force, Recursion, and Dynamic Programming
admin
824
views
asked
Jul 21, 2022
Algorithms
nielit-2021-it-dec-scientistb
algorithm-design
dynamic-programming
recursion
algorithms
+
–
0
0 votes
1
1 answer
646
646 views
NIELIT 2021 Dec Scientist B - Section B: 32
Consider the following $\text{C}$ function :int f(int n) { static int i = 1; if (n = 5) return n; n=n + i;i++; return f(n); }The value returned by $\text{f}(1)$ is :$5$$...
admin
646
views
asked
Jul 21, 2022
Programming in C
nielit-2021-it-dec-scientistb
programming-in-c
recursion
functions
+
–
0
0 votes
0
0 answers
547
547 views
NIELIT 2021 Dec Scientist B - Section B: 63
Division in merge sort algorithm is based on which approach:ParallelRandomInteractiveRecursive
admin
547
views
asked
Jul 21, 2022
Algorithms
nielit-2021-it-dec-scientistb
merge-sort
algorithm-design
recursion
data-structures
sorting
+
–
2
2 votes
3
answers
3 answers
1.9k
1.9k views
Which value of static variable is returned if it is present in return statement of a recursive function?
#include <stdio.h>int f(int n){ static int r = 0; if (n <= 0) return 1; r=n; return f(n-1) + r;}int main() { printf("output is %d", f(5)); return 0;}Ou...
jverma
1.9k
views
asked
May 23, 2022
Programming in C
programming-in-c
recursion
self-doubt
+
–
4
4 votes
1
1 answer
1.3k
1.3k views
GO Classes Test Series 2024 | Programming | Test 3 | Question: 19
#include<stdio.h int test(int *a, int *b) { int c = *a-*b; if (c<0) return 0; else return (1 + test(&c, b)); } void main() { int x = 15; int y = 4; int a = test(&x,&y); p...
GO Classes
1.3k
views
asked
Apr 30, 2022
Programming in C
goclasses2024-programming-3-weekly-quiz
goclasses
programming
programming-in-c
functions
pointers
parameter-passing
recursion
two-marks
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
next »