【数据**结构】
文章平均质量分 59
paidream
这个作者很懒,什么都没留下…
展开
-
【栈的实现】
#include #include #define STACK_INIT_SIZE 100 #define STACKINCREMENT 10 typedef int Status; typedef int SElemType; typedef struct { int stacksize; SElemType *base; SElemType *top; }SqS原创 2013-11-07 22:32:17 · 739 阅读 · 0 评论 -
【进制转换】
#include #include #define STACK_INIT_SIZE 100 #define STACKINCREMENT 10 typedef int ElemType; typedef int Status; typedef struct{ int stacksize; int *top; int *base; }SqStack; Status In原创 2013-11-08 22:47:40 · 578 阅读 · 0 评论 -
【POJ 2349 最小生成树】
http://poj.org/problem?id=2349原创 2014-04-15 09:12:05 · 623 阅读 · 0 评论 -
【树】
二叉树递归和非递归遍历:原创 2014-04-16 19:34:20 · 530 阅读 · 0 评论 -
【NYOJ 202 树的中序遍历】
http://acm.nyist.net/JudgeOnline/problem.php?pid=202 直接输出中序,因为左旋右旋后中序并不改变!!! 开始以为要建树,后来发现不用啊!因为那个输入就是树了,都把每个节点的左孩子右孩子给出来了,那就直接中序遍历之。原创 2014-04-18 15:39:14 · 575 阅读 · 0 评论 -
中序后序先序
/* 要想由这三种遍历二叉树的序列重建唯一的二叉树则至少得有两种遍历序列,且这两种中一定要有中序序列,也就是先序+中序-->二叉树 或者 后序+中序-->二叉树,而先序+中序得不到唯一的二叉树。 */ #include #include #include //二叉链表 typedef struct node{ char data;//节点数据元素 struct node *lchil原创 2014-04-18 16:16:36 · 554 阅读 · 0 评论 -
【最短路径之Dijkstra算法详细讲解 】
1 最短路径算法 在日常生活中,我们如果需要常常往返A地区和B地区之间,我们最希望知道的可能是从A地区到B地区间的众多路径中,那一条路径的路途最短。最短路径问题是图论研究中的一个经典算法问题, 旨在寻找图(由结点和路径组成的)中两结点之间的最短路径。 算法具体的形式包括: (1)确定起点的最短路径问题:即已知起始结点,求最短路径的问题。 (2)确定终点的最短路径问题:与确定起点原创 2014-04-09 20:38:21 · 948 阅读 · 0 评论 -
【巡回赛 496 拓扑排序】
题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=496原创 2014-04-09 19:42:54 · 553 阅读 · 0 评论