CS recursion
Base case
The ____ is at least one case in which a problem can be solved without recursion
Recursive
A method that calls itself is a ____ method
5
Given the following code that uses recursion to find the factorial of a number, if n=5: Private static int factorial(int n) { If(n==0) Return 1; Else Return n*factorial(n-1); }
Depth of recursion
In a recursive program, the number of times a method calls itself is known as the ______
if (n==0) return 1;
In the following code that uses recursion to find the factorial of a number, what is the base case? Private static int(factorial n) { If(n==0) Return 1; Else Return n*factorial(n-1); }
the array must be sorted
To use recursion for a binary search, what is required before the search can proceed?
All of these
Which of the following problem can be solved recursively?