1. Concept: a recursive algorithm is a simple algorithm that uses known conditions to draw intermediate inferences from specific relationships until the results are obtained. Recurrence can be divided into push-down and push-back.
Recursive Algorithms use the "step-by-step" method to constantly use existing information to derive new things.
Pushdown method: it refers to the method to solve the problem step by step based on known conditions. For example, the Fibonacci sequence can be used to calculate new data through the forward method.
Inverse Method: based on known results, iterative expressions are used to calculate the conditions for a problem, that is, the inverse process of the forward method. Demo: http://blog.csdn.net/jtlyuan/article/details/7185110 eg: Fibonacci series code:
/*** @ Declare: it refers to the method to solve the problem step by step based on known conditions. <Br> * For example, the Fibonacci sequence can be used to calculate new data through the forward method. <Br> * @ Author: cphmvp * @ version: 1.0 * @ Date: 9:58:52, January 1, July 29, 2014 */public class recurrence {public int Fibonacci (int n) {int [] f = new int [N]; F [0] = 1; F [1] = 1; for (INT I = 2; I <N; I ++) {f [I] = f [I-1] + F [I-2];} return f [n-1];} public static void main (string [] ARGs) {recurrence = new recurrence (); int Fibonacci = recurrence. fibonacci (10); system. out. println (maid );}}