Home>Article> What two parts must a recursive algorithm include?

What two parts must a recursive algorithm include?

王林
王林 Original
2020-04-29 15:48:32 20205browse

What two parts must a recursive algorithm include?

A recursive algorithm must include a termination condition part and a recursive part.

Extended reading:

What is a recursive algorithm?

Recursive algorithm in computer science refers to a method of solving problems by repeatedly decomposing the problem into similar sub-problems.

Most programming languages support self-calling of functions. In these languages, functions can perform recursion by calling themselves. In many programming languages, it is customary to use recursion to implement loops.

Recommended learning:java entry program

The above is the detailed content of What two parts must a recursive algorithm include?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:1T equals how many G Next article:1T equals how many G