About recursion

1 If you are recursive, you must pay attention to the frame in the stack

After a certain level is executed, the nesting is executed, and the execution continues at the place where the function of the previous layer was interrupted.

As long as there is this analysis process, there will be no problem in the writing of recursive functions.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324870779&siteId=291194637