Concept drill
Recursion
GATE Data Science & AI · Programming - Python · 2026-2026
2
PYQs
100%
keyed
0
elite explanations
1
years appeared
Study anchor
Source-book anchor pending for this concept.
Practice action
Start latest PYQPYQs in this concept
All concepts →2026 Q39
A recursive function in Python is given. def mystery(n): if n <= 0: return 1 else: return mystery(n-1) + mystery(n-2) Now, consider the following function call: mystery(4) Assume t...
mediumanswer key
2026 Q58
Consider the given Python program. def fun(L, i=0): if i >= len(L)-1: return 0 if L[i] > L[i+1]: L[i+1], L[i] = L[i], L[i+1] return 1+fun(L, i+1) else: return fun(L, i+1) data = [5...
hardanswer key