Try this exercise. Click the correct answer from the options.
What is the purpose of the base case in a recursive function?
Click the option that best answers the question.
- To determine the number of times the function should be called
- To perform the main computation of the function
- To stop the recursion and prevent infinite calls
- To check if the input is valid