基础
jert159
这个作者很懒,什么都没留下…
展开
-
二叉树的建立与遍历
数据结构实验之二叉树的建立与遍历 Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 已知一个按先序序列输入的字符序列,如abc,,de,g,,f,,,(其中逗号表示空节点)。请建立二叉树并按中序和后序方式遍历二叉树,最后求出叶子节点个数和二叉树深度。 输入 输入一个长度小于50个字符的原创 2014-08-21 20:36:11 · 473 阅读 · 0 评论 -
链表倒序问题(双向链表的基础运用)
#include #include struct node { int key; struct node *next,*before;//结构中包含前向指针,后向指针 }; typedef struct node n; void main() { int a; n *head,*en,*p,*q,*p3,*p4; head=(n*)malloc(size原创 2015-11-20 23:54:35 · 1641 阅读 · 0 评论