Multiple Choice
Look at the following method: public static int test2(int x, int y)
{
If ( x < y)
{
Return -5;
}
Else
{
Return (test2(x - y, y + 5) + 6) ;
}
}
What is returned for test2(18,5) ?
A) 6
B) -5
C) 7
D) 1
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q1: How many times will the following method
Q3: Look at the following pseudocode algorithm: Algorithm
Q4: A problem can be solved recursively if
Q5: Look at the following pseudocode algorithm: algorithm
Q6: If the base case in a recursive
Q7: Look at the following pseudocode algorithm: algorithm
Q8: The number of times that a method
Q9: Look at the following pseudocode algorithm: Algorithm
Q10: Any problem that can be solved recursively
Q11: Recursive algorithms are usually less efficient than:<br>A)