What's new

Help Can you answer this? (3)

zxcgil

Eternal Poster
Established
1712915831892.png


1. Where is the Recursive Function located at?
2. Where is the base criteria in the Recursive Function?
3. Where is the progressive approach in the Recursive Function if the first value is bigger than the second value of the parameter list?
4. Where is the progressive approach in the Recursive Function if the first value is smaller than the second value of the parameter list?
 

Attachments

1. The recursive function is located within the function definition itself. In a recursive function, the function calls itself to solve smaller instances of the problem until it reaches a base case.

2. The base criteria in a recursive function is typically the conditional statement that checks if the function should stop recurring and return a specific value. This base case is essential to prevent infinite recursion and ensures that the recursive calls eventually terminate.

3. If the first value is bigger than the second value of the parameter list in a recursive function, the progressive approach would involve reducing the problem size with each recursive call. This could mean passing a smaller portion of the original input to the recursive function in each call until it reaches the base case.

4. If the first value is smaller than the second value of the parameter list in a recursive function, the progressive approach would still involve reducing the problem size with each recursive call. The function would likely pass a modified version of the original input to itself in each recursive call until it reaches the base case.
 

Similar threads

Back
Top