recursion.html
来自「数据结构词典(英文)」· HTML 代码 · 共 50 行
HTML
50 行
<!DOCTYPE HTML PUBLIC "-//IETF//DTD W3 HTML 2.0//EN">
<HTML lang="en-US">
<HEAD>
<TITLE>recursion</TITLE>
<META name="description"
content="Definition of recursion,
possibly with links to more information and implementations.">
<META name="keywords" content="recursion">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H1>recursion</H1>
<P>
(algorithmic technique)
<P>
<strong>Definition:</strong>
An algorithmic technique in which a function, in order to accomplish a task, calls itself with some part of the task.
<P><strong>See also</strong>
<a href="iteration.html" tppabs="http://hissa.nist.gov/dads/HTML/iteration.html"><em>iteration</em></a>, <a href="divideconqr.html" tppabs="http://hissa.nist.gov/dads/HTML/divideconqr.html"><em>divide and conquer</em></a>, <a href="tailrecursn.html" tppabs="http://hissa.nist.gov/dads/HTML/tailrecursn.html"><em>tail recursion</em></a>, <a href="collectrecur.html" tppabs="http://hissa.nist.gov/dads/HTML/collectrecur.html"><em>collective recursion</em></a>, <a href="dividemarrig.html" tppabs="http://hissa.nist.gov/dads/HTML/dividemarrig.html"><em>divide and marriage before conquest</em></a>, <a href="recursive.html" tppabs="http://hissa.nist.gov/dads/HTML/recursive.html"><em>recursive</em></a>.
<P><em>Note:
Recursive solutions involve two major parts: <em>base case(s)</em>, where the problem is simple enough to be solved directly, and <em>recursive case(s)</em>. A recursive case has three components: (1) divide the problem into one or more simpler or smaller parts of the problems, (2) invoke the function (recursively) on each part, and (3) combine the solutions of the parts into a solution for the problem. Depending on the problem, any of these may be trivial or complex.</em>
<P>Author: <a href="terms.html#authorPR" tppabs="http://hissa.nist.gov/dads/terms.html#authorPR">PR</a>,<a href="terms.html#authorPEB" tppabs="http://hissa.nist.gov/dads/terms.html#authorPEB">PEB</a>
<H2>More information</H2>
See <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/dynamic.html%23fibonacci \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/dynamic.html%23fibonacci'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/dynamic.html%23fibonacci">dynamic algorithms</A> for an illustration of one trade-off between speed and clarity for a recursive vs. an iterative implementation.
<hr>
Go to the
<A HREF="terms.html" tppabs="http://hissa.nist.gov/dads/terms.html">Algorithms, Data Structures, and Problems</A>
home page.
<hr>
If you have suggestions, corrections, or comments, please get in touch
with
<a href="javascript:if(confirm('http://hissa.nist.gov/~black/black.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://hissa.nist.gov/~black/black.html'" tppabs="http://hissa.nist.gov/~black/black.html">Paul E. Black</a>
(<a href="mailto:paul.black@nist.gov">paul.black@nist.gov</a>).
<p>
Entry modified Thu Sep 2 09:14:58 1999.<BR>
HTML page formatted Wed Dec 22 09:36:19 1999.
<P>
This page's URL is
<A href="recursion.html" tppabs="http://hissa.nist.gov/dads/HTML/recursion.html">http://hissa.nist.gov/dads/HTML/recursion.html</A>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?