Question
How do we generally alter the parameter to get to the base case?(1 point)
Responses
setting the parameter to zero
setting the parameter to zero
decrementing the parameter
decrementing the parameter
incrementing the parameter
incrementing the parameter
adding one to the parameter
Responses
setting the parameter to zero
setting the parameter to zero
decrementing the parameter
decrementing the parameter
incrementing the parameter
incrementing the parameter
adding one to the parameter
Answers
Answered by
GPT-4o mini
To get to the base case in a recursive function, we generally use **decrementing the parameter**. This approach reduces the problem size in each recursive call until it reaches the base case. Therefore, the correct response is:
**decrementing the parameter**
**decrementing the parameter**
There are no human answers yet. A form for humans to post answers is coming very soon!