搜索资源列表
ACKFunction
- 实现阿克曼函数并统计递归调用次数 Counting times of recursion calling 1. 问题描述 定义阿克曼递归函数: ACK(0,n)=n+1 n>=0 ACK(m,0)=ACK(m-1,1) m>=1 ACK(m,n)=ACK(m-1,ACK(m,n-1)) m,n>0 2. 基本要求 读入m、n,输出ACK(m,n)的值,并统计递归调用次数。-Ackermann achieve statistical a
2.21
- 哈夫曼的优先算法(根据递归调用的循环算法)很有用-Huffman algorithm (based on recursive algorithm called the cycle) useful
Hanoi_2
- 汉诺塔的双递归调用,一样的原理,新的思路,新的算法。-HANOR double recursive call, the same principle, the new ideas and new algorithms.
erfenfa2
- 非递归调用的二叉查找法:初始化一个数组,提示输入待查元素,返回查找的结果和查找次数-non - recursive call the binary search method : an array initialization, suggesting that the importation of unknown origin elements, return to the search results and the number of search
search
- 各种排序查找法与一些优秀的算法,包括二分查找,利用递推公式计算(裴波拉契数列),冒泡法,递归调用,顺序查找,选择法,直接插入,直接排序等...个人珍藏..初学者可以拿来参考下..很不错
merge
- 首先通过递归调用,将原数组不断的分小,最终将数组分成N份。然后将有序的两组合并成一个有序数组,每合并一次数组的规模.就会翻倍,最终会将原来无序的数组变成一个有序的数组。
four
- 四叉树递归 此种模型绘制类似米字形的网格。由于整个过程递归调用绘图函数,所以可以根据误差判断绘制DEM的精细程度,从而绘制出不同精细程度的DEM,为解决漫游中数据量较大而引起的画面不流畅现象提供了模型基础。 本文并没有对LOD作研究,只是给出了四叉树的建立和遍历绘图的方法。
qSort
- 快速排序算法是基于分治策略的另一个排序算法。其基本思想是,对于输入的字数组a[p:r],按以下3个步骤进行排序: (1)分解:以a[p]为基准元素将a[p:r]划分成3段a[p:q-1],a[q]和a[q+1:r],使得a[p:q-1]中任何元素小于等于a[q],a[q+1:r],中的任何元素大于等于a[q]。下标q在划分过程中确定 (2)递归求解:通过递归调用快速排序算法,分别对a[p:q-1]和a[q+1:r]进行排序 (3)合并:在a[p:q-1]和a[q+1:r]已经排好序的
swiftordering
- 从数组中 任取一个元素 p (可随机取,现在以取第一个为例).以P作为主元,对数组 进行划分 ,前一部分小于 P,后一部分 大于p.最后划分处存储p,然后分别对划分后的前一部分和后一部分递归调用. 算法平均时间复杂度: O(nlogn)
playMax
- 用回溯法和递归调用的思想实现了多边形游戏算法,用codeblocks开发。输入多边形的N个定点的数值和N条边的运算符,可计算任意断开一条边后计算所得的最大值。-Backtracking and recursive calls with the idea to achieve a polygon game algorithm, using codeblocks development. Input polygon fixed values of N and N edge
C_TREE
- 本例题将介绍一种建立二叉树的算法。同时介绍对“遍历算法”灵活应用:将二叉树中每个结点的左右子树进行交换。介绍求二叉树深度的算法。 二叉树的建立是一个递归方法,与二叉树先序遍历思路有点相似。数据的组织是先序遍历的顺序,但是当某结点的某孩子为空时以数据0来充当,也要输入。结合右图的二叉树,其数据的输入顺序应该是: 1 2 4 0 0 0 3 5 0 7 0 0 6 8 0 0 9 0 0。 若当前数据不为0,则申请一个结点存入当前数据。如果输入0表明是空(NULL),不分配结点。递归调用
8Queen
- 此程序乃8皇后问题,是数据结构中一个典型递归调用程序,此程序可输入任意个皇后数目赖进行计算-This procedure is 8 Queen' s problem is the data structure of a typical recursive procedure call, this program can enter any number of Queen' s calculation depends on
myproject
- 应用DFS,递归调用完成的图中环查找算法过程-Application of DFS, recursive calls to complete the plan process in Central search algorithm
bahuanghouwenti
- 八皇后问题,用vc编写了一个可以解决八皇后问题的程序,实现了递归调用。-The eight queens problem, using vc write a means of solving the eight queens problem program to achieve the recursive calls.
Tree
- 用递归调用的思想创建二叉树并对其进行先序、中序以及后序遍历-Recursive call with the idea to create a binary tree and gain first-order, middle order, and postorder
TopologicalSort
- 采用递归调用的方法打印输出一个非循环图的所有拓扑排序-output all the topological sorts of an acyclic graph
hanoi
- Hanoi塔的递归调用和消除尾递归的方法,附带算法的设计思路和分析-Hanoi Tower recursive calls and the elimination of tail recursion method with the algorithm design and analysis of ideas
1
- 最短哈密尔顿图,穷举法,递归调用, 深度优先查找-The shortest Hamiltonian, brute-force method, the recursive call, depth-first search
diguiqiuhe
- 通过函数实现,递归调用,求1+2+3....+n的和-failed to translate
hanoi
- C语言中的经典算法:哈诺塔问题,递归调用的经典应用-hanoi in C language