Recursion termination: Difference between revisions

Content deleted Content added
Flyer22 Frozen (talk | contribs)
Nonlead-word nonproper noun MOS:CAPS > low-case. WP:LINK update, cut needless WP:PIPE. Small WP:EoS WP:COPYEDITs.
Line 1:
 
In computing, '''Recursionrecursion termination''' is when certain conditions are met and thea [[recursive algorithm]] ceasesstops calling itself and begins to return values.<ref>http://www.itl.nist.gov/div897/sqg/dads/HTML/recursiontrm.html</ref> This happens only if, with every recursive call, the recursive algorithm changes its state and moves towardstoward the base case. Cases that satisfy the definition, without being defined in terms of thethat definition itself, are called base cases. They are small enough to solve directly.<ref>
{{cite book
| title = Recursion Lecture, Introduction to Computer Science pg. 3
Line 19:
 
===C++===
[[C++An example in the (programming language)| [[C++]] Example:<ref>
{{cite book
| title = An Introduction to the Imperative Part of C++
Line 44:
 
[[Category:Recursion]]
 
 
{{compu-prog-stub}}