What is the purpose of a base case in recursion?
To reduce space complexity
To increase the speed of the algorithm
To allow the function to return a value
To provide a stopping condition to prevent infinite loops