代码搜索:递归回溯

找到约 2,805 项符合「递归回溯」的源代码

代码结果 2,805
www.eeworm.com/read/115447/15014071

c 习题-33.c

//本程序只给出了算法思想 //读者可以自己完善本程序 void PreOrder_Nonrecursive(Bitree T)//先序遍历二叉树的非递归算法 { InitStack(S); Push(S,T); //根指针进栈 while(!StackEmpty(S)) { while(Gettop(S,p)&&p) { visit(p->data);
www.eeworm.com/read/216116/15026792

cpp erfenfa2.cpp

//二分查找法(非递归调用)erfenfa2.cpp #include #include #include void binsrch(int a[],int n,int x) {int mid,top=0,bot=n-1,find=0,m=0; do { m=m+1; mid=(top+bot)/2;
www.eeworm.com/read/114275/15062404

cpp 二叉树.cpp

// 二叉树.cpp : Defines the entry point for the console application. // #include "stdafx.h" #define STACK_INIT_SIZE 20 #define STACKINCREMENT 5 #define NULL 0 // 用二叉树的顺序存取结构,用非递归中序遍历算法遍历二叉树; i
www.eeworm.com/read/212829/15148322

cpp erfenfa2.cpp

//二分查找法(非递归调用)erfenfa2.cpp #include #include #include void binsrch(int a[],int n,int x) {int mid,top=0,bot=n-1,find=0,m=0; do { m=m+1; mid=(top+bot)/2;
www.eeworm.com/read/212828/15148411

c 习题-39.c

//本程序只给出了算法思想 //读者可以自己完善本程序 typedef struct { int low; nt high; } boundary; //子序列的上下界类型 void QSort_NotRecurve(int SQList &L)//快速排序的非递归算法 { low=1;high=L.length; InitStack(S); //S的元素为bounda
www.eeworm.com/read/212828/15148471

c 习题-33.c

//本程序只给出了算法思想 //读者可以自己完善本程序 void PreOrder_Nonrecursive(Bitree T)//先序遍历二叉树的非递归算法 { InitStack(S); Push(S,T); //根指针进栈 while(!StackEmpty(S)) { while(Gettop(S,p)&&p) { visit(p->data);
www.eeworm.com/read/208856/15234108

cpp algo0602.cpp

Status InOrderTraverse(BiTree T, Status (*Visit)(ElemType)) { // 算法6.2 // 采用二叉链表存储结构,Visit是对数据元素操作的应用函数。 // 中序遍历二叉树T的非递归算法,对每个数据元素调用函数Visit。 stack S; BiTree p; InitStack(S); Push(
www.eeworm.com/read/208856/15234114

cpp algo0601.cpp

Status PreOrderTraverse( BiTree T, Status(*Visit)(ElemType) ) { // 算法6.1 // 采用二叉链表存储结构,Visit是对数据元素操作的应用函数, // 先序遍历二叉树T的递归算法,对每个数据元素调用函数Visit。 // 最简单的Visit函数是: // Status PrintEl
www.eeworm.com/read/206115/15299833

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); else z=ack(m-1,ack(m,n-1));
www.eeworm.com/read/195829/5107158

txt 8_6.txt

void InsertBST(BSTree *bst, KeyType key) /*若在二叉排序树中不存在关键字等于key的元素,插入该元素*/ { BSTree s; if (*bst == NULL)/*递归结束条件*/ { s=(BSTree)malloc(sizeof(BSTNode));/*申请新的结点s*/ s-> key=key; s->lchi