Home > Back-end > What is the difference between recursive function and loop statement?
What is the difference between recursive function and loop statement?
Time:11-08
Feel the essence of recursion is cycle itself, so the recursive recursive loop said, or recursion is a subset of the set of loop, but lack of knowledge of this respect, strives for the bosses, correctly explain the
CodePudding user response:
Python if using the eval statement, can use a loop to realize recursion
CodePudding user response:
Send the wrong figure this monkey figure with not accustomed to
CodePudding user response:
Don't know what you study is that language, but in c + + based circulation are two, 1, for; Know starting conditions, termination conditions, 2, while; Know what kind of conditions jumped out,
In addition recursive, generally is the function, only know the situation or at the next higher level or lower level conditions, but know the finish or head conditions, Then use recursive functions, Looks similar to cycle, but there is a big difference,