搜索资源列表
BinaryTree Visit,all methods
- 二叉树的所有遍历算法,包括前序、中序、后序的递归与非递归算法,还有层次遍历从上至下、从下至上、从左到右、从右到左遍历方法。
迷宫求解的非递归算法
- #include #include #include #define N 20 int aa[N][N]; int yes=0; int x[100][2],n=0; void fun1(int (*aa)[N],int (*a)[N]); int fun(int (*a)[N],int i,int j); void begain(int (*t)[N]); void pr(int (*t)[N],int nn); void win(int (*t)[N]); void lose(); void
常见算法及函数源代码
- 算法设计与分析 1. 用直接递归方法计算n!: (2)通过键盘输入n的值,( 2. 用直接递归方法计算第n个Fibonacci数: 3. 用直接递归方法计算Ackerman函数: 4. 用直接递归方法给出n个元素的全排列: 8. 用直接递归方法求解Hanoi塔问题 ,Algorithm Design and Analysis 1. Using direct recursive meth
LCS.rar
- 求两个字符串的最长公共子序列,使用递归算法实现。,For two of the longest common sub-string sequences, using the recursive algorithm.
wine_dividing.rar
- 分酒问题:已知有3个容量分别为3kg,5kg和8kg且没有刻度的酒瓶,3kg和5kg的酒瓶均装满了酒,而8kg的瓶子为空.现要求仅用这3个瓶子将这些酒分为两个4kg,并分别装入5kg和8kg的瓶子中. 提示:回溯,递归算法.最初始的状态为(350),最终的状态为(044),要求求解所有的解法.,Hours of liquor question: known to have three capacity, respectively 3kg, 5kg and 8kg without calibr
PSOGABPDRNN.rar
- 此包含有遗传算法、粒子群算法、BP算法优化对角递归神经网络的MATLAB程序,This includes genetic algorithms, particle swarm optimization, BP algorithm for diagonal recurrent neural network of the MATLAB program
migongxunlu.rar
- 实现迷宫自动寻路的一个机器人算法,使用了递归算法及堆栈操作,很具有参考价值,Automatically achieve the maze routing algorithm for a robot, the use of a recursive algorithm and the stack operation, is a reference value
搜集整理的计算24点的算法
- (24点算法)第一个算法是用C语言描述的,第二个是C++描述的,都是我在网上搜集整理的计算24点的算法,其中第二个最容易理解(递归的魅力),因为它用了string这种很方便的字符串流,第一种算法很复杂,我每次都要再看过,大家可以收藏起来慢慢品味~ ,(24-point algorithm) algorithm is first described by C language, the second is C++ are described, all my online collection
include.rar
- 1. 输入字符序列,建立二叉链表。 2. 中序遍历二叉树:递归算法。 3. 中序遍历二叉树:非递归算法。 4. 求二叉树的高度。 5. 球二叉树的叶子个数。 6. 将二叉链表视为森林的孩子兄弟链表,计算森林中叶子个数。 7. 建立中序线索二叉树,并实现中序遍历。 8. 借助队列实现线索二叉树的层次遍历。 ,tree
quicksort
- 快速排序[非递归]算法 by buptwugh-Quick sort [non-recursive] algorithm made by buptwugh
BiTree
- 1.构建二叉树 2.编写递归算法,交换二叉树的左右子树; 3.输出按先序遍历得到的新二叉树结果。 -1 build a binary tree 2 write a recursive algorithm, exchange the left and right binary subtree 3 preorder traversal of the output obtained by a new binary tree results.
mc-problem
- N个传教士和野人的渡河问题,采用递归算法-Missionaries and the savages of N crossing problem, using a recursive algorithm
queen
- 八皇后问题。利用了递归算法,很是巧妙!最后一行为输出解的个数,每行共8个数字,这些数字即代表皇后在该行的位置。-It s a code about Eight queen.
数据结构中关于单链表的算法
- 数据结构中关于单链表的算法,将两个链表有序链合并成一个非递归有序的单链表,并不占用其他的存储空间,data structure of single-chain algorithm Listless and orderly of the two chains merged into a non- recursive and orderly single linked list, does not occupy other storage space
Hanoi.rar
- 用VC++6.0和OpenGl实现的汉诺塔移动算法,速度可以自己调节,主要是汉诺塔的递归算法。,With VC++6.0 and implementation of OpenGl Mobile Tower of Hanoi algorithm, the rate can adjust is the Tower of Hanoi recursive algorithm.
EightQueens.rar
- 一个用来研究八皇后问题的java小程序,采用递归算法遍历树来穷举所有符合要求的排列,存储后用图形界面表示出来。,Used to study a problem of the eight Queen of java applets, using recursive tree traversal algorithm to exhaustive array of all meet the requirements, storage, said later from a graphical interf
Fibonacci
- 用递归算法实现,输入n后可得第n项斐波拉契数,并求出计算所用时间-Recursive algorithm, the input can be obtained after the first n n Feibolaqi item number, and extracts used in the calculation of time
dashuxiangcheng
- 利用分治方法设计实现大整数乘法的递归算法-Using the method of big integer partition design and realize the recursion algorithm square
hannuota
- 计算机组成原理 海明码校验根据数据输出根据算法算出的海明校验码 2 实现汉诺塔,递归算法-haiming code hanruo
match
- tc实现的简单计算器,能进行简单的整数四则运算,主要采用递归算法。-c to achieve a simple calculator that can perform simple integer four operations, mainly in a recursive algorithm.