搜索资源列表
递归中序遍历排序二叉树
- 这是一个中序遍历二叉树的VC实现,要注意的是输入节点后,以-1结束-which is a binary tree traversal sequence VC, to pay attention to the input nodes, in the end -1
实验7 二叉树 北京师范大学数学科学院
- 自创的算法,输入表达式,建立二叉树的程序,然后输出前缀中缀后缀表示法,利用的对表达式的分割与递归实现输入,同时这也是一个完整的波兰式转换程序,相当稳健-own algorithm, the importation of expression, the establishment of the binary tree and then output the suffix prefix which is made up of the method, using the right expressio
背包问题的两种算法实现
- 本例编程实现背包问题的递归和非递归算法,让你彻底了解这种算法-the cases Programming knapsack problem of recursive and non - recursive algorithm, so you thoroughly understand this algorithm
递归算法快速排序
- 分而治之方法还可以用于实现另一种完全不同的排序方法,这种排序法称为快速排序(quick sort)。在这种方法中, n 个元素被分成三段(组):左段l e f t,右段r i g h t和中段m i d d l e。中段仅包含一个元素。左段中各元素都小于等于中段元素,右段中各元素都大于等于中段元素。因此l e f t和r i g h t中的元素可以独立排序,并且不必对l e f t和r i g h t的排序结果进行合并。m i d d l e中的元素被称为支点( p i v o t )。图1 4
xianxuxunhuan
- 二叉数先序循环的非递归实现,一般先序循环都是由递归实现的,按照完全二叉树格式输入字符型结点值-binary sequence a few first cycle of non - recursive, the general first order recursive cycle are achieved, In accordance with the format completely binary tree node input character values
a
- 递归实现折半查找的C++源程序,快速查找一个数在数列中位置.
TestTree
- 本程序实现了二叉树遍历算法的递归和非递归实现。
消除文法左递归
- 消除文法左递规算法的实现(此为可执行源代码)-left eliminate grammar rules delivery algorithm implementation (such as executable code )
quick sort 快速排序的迭代实现
- 快速排序的迭代实现,不是递归的,递归的比较容易实现,迭代实现起来比较困难
快速排序非递归算法(队列实现)
- 快速排序的非递归方法
BinarySearchTree
- 二叉搜索树的各种基本操作,各种遍历的递归和非递归实现,还有输出在指定范围的节点等-Binary search tree, variety of basic operations, a variety of traversal recursive and non-recursive implementation, as well as output in the specified range of nodes, etc.
2010quicksort
- c++用栈代替递归实现的快速排序,快速排序是一种比较节约时间的排序,一般用递归的方法实现,用栈虽然占用空间比递归大,但不要像递归一样把大多的时间浪费在递归的过程中,特别是对数字比较多的排序更有效-Recursive stack instead of using quick sort, quick sort is a kind of sorting to save time, usually with a recursive method to achieve, although the use
a.doc
- 1) 根据栈数据结构,分别建立一个顺序栈和链式栈并实现其上基本操作(出栈和入栈等); 2) 根据队列数据结构,分别建立链队列和循环队列,并完成其上的基本操作(出入队列等); 3) 参考P80表达式求值例题,应用栈的基本操作实现简单表达式求值运算及其进出栈模拟过程(给出程序执行过程中栈的变化过程); 4) 阅读P83栈与递归的实现一节内容和3阶汉诺塔问题。使用栈数据结构解决3阶汉诺塔问题,编写程序并模拟栈及其汉诺塔的搬运过程(给出程序执行过程栈的变化过程与圆盘的搬动状态)。 5)
_Queen
- 非递归实现N皇后问题求解,输出全部求解的集合。-Non-recursive realization of N Queen s problem solving, solving a collection of all output.
erfenfadigui
- 用递归实现的二分法,数据结构的典型问题,二分查找也称折半查找,它要求待查找的数据元素必须是按关键字大小有序排列的顺序表。-Realize the dichotomy with recursive data structure of a typical problem, binary search, also known as split-half search, which requires the data elements to be search by keyword must be or
path
- 找出(二叉树中)从根结点到任一给定的结点的路径(非递归实现)-To find (in Binary Tree) from the root node to any given node of the path (non-recursive implementation)
mataqipan
- 数据结构课程设计之马踏棋盘(非递归实现)-Data structure of the horse riding course design board (the realization of non-recursive)
asdas
- 算术表达式递归下降分析程序设计 编程实现给定算术表达式的递归下降分析器。 算术表达式文法如下: E E+T | T T T*F | F F (E) | i -Arithmetic expressions recursive descent analysis program design programming for a given arithmetic expression recursive descent pars
BTree 二叉树的遍历与应用
- 二叉树的建立,前序中序后序遍历,线索化,递归非递归遍历,查找前驱或后继结点,输出,菜单实现。-The establishment of a binary tree, inorder preorder postorder traversal, threaded, non-recursive traversal recursion, find precursor or successor nodes, output, menu implementation.
cycle_output
- 使用Python语言,利用递归的方式,实现顺时针输出整个矩阵中的每一个元素。同时还写了实现这个方法的超级简化版代码,体现了Python编程语言简洁的优点(Using Python language and recursive method, each element of the whole matrix can be output clockwise. At the same time, the simplified code to implement this method is also