Solved

Public Static Int Func1(int M, Int N)

Question 40

Multiple Choice

public static int func1(int m, int n)
{
If (m == n || n == 1)
Return 1;
Else
Return func1(m - 1, n - 1) + n * func1(m - 1, n) ;
}What precondition must exist in order to prevent the code in the accompanying figure from infinite recursion?


A) m >= 0 and n >= 0
B) m >= 0 and n >= 1
C) m >= 1 and n >= 0
D) m >= 1 and n >= 1

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents