代码搜索:递归回溯
找到约 2,805 项符合「递归回溯」的源代码
代码结果 2,805
www.eeworm.com/read/163810/10144645
cpp z1.cpp
/*4.3.3源程序*/
#include
#include
#include
#include
#include
#define N 20/*迷宫的大小,可改变*/
int oldmap[N][N];/*递归用的数组,用全局变量节约时间*/
int yes=0;/*yes是
www.eeworm.com/read/280448/10330454
txt 设计说明.txt
// 设计说明
// 设计:黄宇航,修改:仙剑修,2002.12.6
Layer 不需要修改。
Cell 修改:独立出地表层,不参加Layer对象的管理,不能删除。
TerrainLayer 改为了CMapData
CTerrainObj 可放在CMapData中的对象。(以后可考虑递归包含自身)
CTerrainObjPart 是CTerrainObj的部件
www.eeworm.com/read/352747/10519624
c algo3-8.c
/* algo3-8.c 用递归调用求Ackerman(m,n)的值 */
#include
int ack(int m,int n)
{
int z;
if(m==0) /* 出口 */
z=n+1;
else if(n==0)
z=ack(m-1,1); /* 对形参m降阶 */
else
z=
www.eeworm.com/read/450886/7475301
c 习题-35.c
//本程序只给出了算法思想
//读者可以自己完善本程序
void STraverse_Nonrecursive(Graph G)//非递归遍历强连通图G
{
int visited[MAXSIZE];
InitStack(S);
Push(S,GetVex(S,1)); //将第一个顶点入栈
visit(1);
visited =1;
while(!StackEmpt
www.eeworm.com/read/450886/7475306
c 习题-40.c
//本程序只给出了算法思想
//读者可以自己完善本程序
void STraverse_Nonrecursive(Graph G)//非递归遍历强连通图G
{
int visited[MAXSIZE];
InitStack(S);
Push(S,GetVex(S,1)); //将第一个顶点入栈
visit(1);
visited =1;
while(!StackEmpt
www.eeworm.com/read/448826/7525152
txt 027.txt
027
题目:利用递归函数调用方式,将所输入的5个字符,以相反顺序打印出来。
程序源代码:
#include "stdio.h"
main()
{
int i=5;
void palin(int n);
printf("\40:");
palin(i);
printf("\n");
}
void palin(n)
int n;
{
char next;
www.eeworm.com/read/448198/7538340
c 习题-35.c
//本程序只给出了算法思想
//读者可以自己完善本程序
void STraverse_Nonrecursive(Graph G)//非递归遍历强连通图G
{
int visited[MAXSIZE];
InitStack(S);
Push(S,GetVex(S,1)); //将第一个顶点入栈
visit(1);
visited =1;
while(!StackEmpt
www.eeworm.com/read/448198/7538345
c 习题-40.c
//本程序只给出了算法思想
//读者可以自己完善本程序
void STraverse_Nonrecursive(Graph G)//非递归遍历强连通图G
{
int visited[MAXSIZE];
InitStack(S);
Push(S,GetVex(S,1)); //将第一个顶点入栈
visit(1);
visited =1;
while(!StackEmpt
www.eeworm.com/read/438832/7725347
sh recurse.sh
#!/bin/bash
# recurse.sh
# 脚本能否递归地调用自己?
# 是的, 但这有什么实际的用处吗?
# (看下面的.)
RANGE=10
MAXVAL=9
i=$RANDOM
let "i %= $RANGE" # 在0到$RANGE - 1之间, 产生一个随机数.
if [ "$i" -lt "$MAXVAL" ]
then
echo "i = $i"
www.eeworm.com/read/436719/7765283
cpp bo7-3.cpp
// bo7-3.cpp 算法7.4~7.6
Boolean visite[MAX_VERTEX_NUM]; // 访问标志数组(全局量)
void(*VisitFunc)(VertexType); // 函数变量
void DFS(Graph G,int v)
{ // 从第v个顶点出发递归地深度优先遍历图G。算法7.5
int w;
visite[v]=TRU