代码搜索:递归回溯
找到约 2,805 项符合「递归回溯」的源代码
代码结果 2,805
www.eeworm.com/read/286814/4032551
cpp a_5_6.cpp
#include "stdafx.h"
#include
using namespace std;
int apple(int n) /*递归函数*/
{ int k;
if (n==1) k=1;
else k=2*apple(n-1)+3;
return k;
}
void main()
{int a,k=4;
a=appl
www.eeworm.com/read/133132/14054000
cpp 2.cpp
//9.层次的非递归算法
#include
#include
#include
typedef struct BTNode
{//定义树的存储结构
char data;
BTNode *lchild,*rchild;
}* BTree;
typedef struct QNode
{ //节点
www.eeworm.com/read/204479/15337814
c graph_deeptravel_adjlist_nrec.c
/* 用邻接表表示的图的深度优先周游的非递归算法*/
#include
#include
#define MAXVEX 20
typedef struct EdgeNode EdgeNode;
typedef struct EdgeNode * PEdgeNode;
typedef struct EdgeNode * EdgeList;
www.eeworm.com/read/204479/15337836
c graph_deeptravel_adjmat_rec.c
/* 用邻接矩阵表示的图的深度优先周游的递归算法*/
#include
#define MAXVEX 6
#define MAX 0
#define NON -1
typedef char VexType;
typedef float AdjType;
typedef struct {
int n;
www.eeworm.com/read/107030/15614500
c 二进制数.c
/*递归法求二进制数*/
#include
void printb(int x,short int n);
void main()
{
short int x;
printf("input number:");
scanf("%d",&x);
printf("number of decimal form: %d\n",x
www.eeworm.com/read/101177/15842099
cpp 检查光盘文件可读性.cpp
#include
#include
char path[MAXDIR];
int olddisk,newdisk;
void copy(struct ffblk *ff);
void mainsearch( ) /* 递归搜索当前盘下的子目录 */
{
int done;
struct ffblk f;
done=findfirst("*.*
www.eeworm.com/read/289625/8539188
asv listorder.asv
function lsorder=listorder(mr,mc,pr,pc)
% 函数 LISTORDER() 生成按‘Z’型递归结构排列的坐标列表
% 函数递归原理:对一个mr*mc的矩阵,其左上角元素的坐标为(pr,pc);首先将矩阵按“田”
% 字型分成四个对等的子矩阵,每个子矩阵的行、列数均为mr/2、mc/2,左上角元素的坐标
% 从上到下、从左到右分别为(pr,pc)、(pr ...
www.eeworm.com/read/289625/8539204
m listorder.m
function lsorder=listorder(mr,mc,pr,pc)
% 函数 LISTORDER() 生成按‘Z’型递归结构排列的坐标列表
% 函数递归原理:对一个mr*mc的矩阵,其左上角元素的坐标为(pr,pc);首先将矩阵按“田”
% 字型分成四个对等的子矩阵,每个子矩阵的行、列数均为mr/2、mc/2,左上角元素的坐标
% 从上到下、从左到右分别为(pr,pc)、(pr ...
www.eeworm.com/read/289575/8543065
asv listorder.asv
function lsorder=listorder(mr,mc,pr,pc)
% 函数 LISTORDER() 生成按‘Z’型递归结构排列的坐标列表
% 函数递归原理:对一个mr*mc的矩阵,其左上角元素的坐标为(pr,pc);首先将矩阵按“田”
% 字型分成四个对等的子矩阵,每个子矩阵的行、列数均为mr/2、mc/2,左上角元素的坐标
% 从上到下、从左到右分别为(pr,pc)、(pr ...
www.eeworm.com/read/289575/8543111
m listorder.m
function lsorder=listorder(mr,mc,pr,pc)
% 函数 LISTORDER() 生成按‘Z’型递归结构排列的坐标列表
% 函数递归原理:对一个mr*mc的矩阵,其左上角元素的坐标为(pr,pc);首先将矩阵按“田”
% 字型分成四个对等的子矩阵,每个子矩阵的行、列数均为mr/2、mc/2,左上角元素的坐标
% 从上到下、从左到右分别为(pr,pc)、(pr ...