Description: 利用栈编的汉诺塔程序,c语言实现,有两个,一个有图形界面。记住是用栈的原理编的哦,汉诺塔程序常有,而用栈原理编的不常有!对于栈的理解很有帮助!-Stack for use of the Tower of Hanoi program, c language, there is both, a graphical interface. Keep in mind the principle of stack are used for the Oh, Tower of Hanoi procedures often, and made use of the principle of non-stack often! Helpful for the understanding of the stack! Platform: |
Size: 2048 |
Author:肖平 |
Hits:
Description: 2-1以顺序栈作为存储结构 实现顺序栈的入栈运算,出栈运算,并且读取栈顶元素;
2-2以链栈作为存储结构,实现栈上的数据元素的插入运算,删除运算,并读取链栈的栈顶元素;
2-3 以循环队列喂存储结构,实现循环队列的建立,实现循环队列的入队运算,出队运算;
2-4用栈实现括号的匹配问题;
2-5实现汉诺塔问题.;
3-1采用链式存储表示,按给定的先序序列创建二叉树,并输出二叉树。
3-2-1和3-2-2采用二叉链表作为存储结构,建立二叉树,采用递归算法实现二叉树遍历,另外采用非递归算法实现二叉树遍历。
3-3采用二叉树作为存储结构,实现对二叉树的线索化,中序遍历线索二叉树
4-1-1、4-1-2、4-1-3以邻接结构作为存储结构,定义图节点vertexnode,实现图的下列运算:a以邻接表作为存储结构建立图,b按照深度遍历算法遍历图,c按照冠以算法遍历图
4-2用普利姆算法求图的最小生成树,并且分析时间复杂度和空间复杂度-2-1 stack in the order as the storage structure to achieve sequential stack push operation, the stack operation, and read the top element
2-2 chain stack as a storage structure, to achieve the insertion of the data element in the stack on the operator to delete the operation, and reads the chain top of the stack element
2-3 in a circular queue feed storage structures, and the establishment of the circular queue, circular queue enqueue operation dequeue op
2-4 with stack parenthesis matching
2-5 the Towers of Hanoi problem.
3-1 chain store said that according to a given set of first-order sequence to create a binary tree, and outputs a binary tree.
3-2-1 and 3-2-2 binary list as the storage structure, the establishment of a binary tree, using recursive the algorithm binary tree traversal, In addition to the use of non-recursive algorithm binary tree traversal.
3-3 binary tree as a storage structure clues of binary tree in preorder traversal threaded binary
4-1-1,4-1-2,4-1- Platform: |
Size: 2593792 |
Author:梁思 |
Hits: