Question DSA-REC-0045
MediumWhat is the output of this code?
def count(n, k):
if k == 0 or k == n:
return 1
return count(n - 1, k - 1) + count(n - 1, k)
print(count(6, 2))
- A.
6
- B.
15
- C.
Sign up free to see the answer and a step-by-step explanation.