❓ Help Can you answer this? (3)

zxcgil

Honorary Poster
1712915831892.webp


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?
 
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.
 

About this Thread

  • 1
    Replies
  • 492
    Views
  • 1
    Participants
Last reply from:
Unknown user

Trending Topics

Online now

Members online
409
Guests online
988
Total visitors
1,397

Forum statistics

Threads
2,273,593
Posts
28,950,484
Members
1,235,847
Latest member
eevaliceturtle
Back
Top