ACM summary of ten

Recursive beginning to understand
recursion is simply a function directly or indirectly calls itself a way, it is usually a large complex problem with the original layers into a smaller problem to solve similar problems. Someone know almost gives a very vivid metaphor: we can "recursive" compared to the "dictionary", when you check a word, find the word interpretation still do not understand a word, I began to look it up in the second words. Unfortunately, the second word still do not understand the words, so check the third word, this investigation continues. Until every word of explanation can understand, then went to the recursion, then you start back, one by one to understand every word before checked and eventually you understand the meaning of the beginning of that word. Recursive problem has two prerequisites: the original sub-issues to be a problem for the same thing, and the scale is smaller; the program stop conditions.

Guess you like

Origin blog.csdn.net/qq_43515378/article/details/89290706