C Language Problems (About Recursive Algorithms)
This is a recursive algorithm, and the most important essence of recursive algorithm is to reduce the scale. Each step is obtained on the basis of the previous step. The function calls itself to the minimum scale, then initializes the minimum scale, laying a good foundation for the subsequent calls, and the rest is calculated on this basis. To put it bluntly, recursion is the application of complete induction in high school mathematics. Write the hypothesis of n= 1 first, and then the following proofs are all based on n=N- 1, so the most basic foundation is that n= 1 holds. This is the meaning of recursion. Define the basis. You only need to think about how n=N is derived from n=N- 1 for the following questions. Don't think too deeply, or you will fall into a strange circle of thinking and have a headache.