Recursion (computer science): Difference between revisions

Content deleted Content added
Ver (talk | contribs)
m recursion vs. iteration: Capitalization correction
Deleted the beginning paragraph as its text was already used farther in the article (and actually was a bad introduction to recursion)
Line 1:
'''Recursion in computer programming''' defines a function in terms of itself. One example application of recursion is in [[parser|parsers]] for programming languages. The great advantage of recursion is that an infinite set of possible sentences, designs or other data can be defined, parsed or produced by a finite computer program.
A common method of simplification is to divide a problem into subproblems of the same type. As a [[computer programming]] technique, this is called [[divide and conquer algorithm|divide and conquer]] and is key to the design of many important algorithms, as well as being a fundamental part of [[dynamic programming]].
 
Recursion in computer programming defines a function in terms of itself. One example application of recursion is in [[parser|parsers]] for programming languages. The great advantage of recursion is that an infinite set of possible sentences, designs or other data can be defined, parsed or produced by a finite computer program.
===Recursive algorithms===
A common method of simplification is to divide a problem into subproblems of the same type. As a [[computer programming]] technique, this is called [[divide and conquer algorithm|divide and conquer]] and is key to the design of many important algorithms, as well as being a fundamental part of [[dynamic programming]].