Joke Collection Website - Talk about mood - Can anyone tell me what the difference is between recursion and iteration?
Can anyone tell me what the difference is between recursion and iteration?
To put it simply, recursion means calling yourself, such as:
int abc(...)
{
if( ...) //Recursion termination condition
{ return abc(...); }
return 0;
}
Recursion is to repeat a set of instructions and continuously derive new values ??based on the old values ??of variables, such as:
for(; ; ;) //Iteration termination condition
{
p>
a = b c;
b = a;
c = a;
}
- Previous article:Brief score of Henan opera Mother.
- Next article:Wu Jing's famous words
- Related articles
- When buying a sofa, do you think you should choose a spring frame or a solid wood frame?
- Woman talks about her feelings hard
- What if the sales colleagues of the company deliberately violate the company's system to pry the order?
- The top ten completed online novels
- Introduction of sound barrier safety door?
- Simple sentences that women want.
- What do you mean, come home from work?
- Disappointment has no hope, just disappointment.
- Expressing extreme disappointment and sadness to your boyfriend: a selection of 78 sentences
- Request Yu Dan’s section in "Artistic Life-Warmth 2008"