Home > Common Problem > What two parts must a recursive algorithm include?

What two parts must a recursive algorithm include?

王林
Release: 2020-04-29 16:26:33
Original
20354 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template