Chinaunix首页 | 论坛 | 博客
  • 博客访问: 685781
  • 博文数量: 152
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1793
  • 用 户 组: 普通用户
  • 注册时间: 2013-09-12 12:26
个人简介

相信自己,只有不想做的,没有做不到的。

文章分类

全部博文(152)

文章存档

2021年(1)

2015年(2)

2014年(74)

2013年(75)

发布时间:2013-10-27 21:54:56

#include <stdio.h>#include <stdlib.h>#define N 6//构建一个二叉树的结构体,数据,左孩子,右孩子typedef struct btree{int data;struct btree *lchild;struct btree *rchild;}BTREE;//创建一个二叉树的空节点,没有左右孩子BTREE *space_node(int data){BTREE *tree;tree = (BTREE *)malloc(sizeof(B.........【阅读全文】

阅读(4176) | 评论(0) | 转发(0)

发布时间:2013-10-27 21:33:38

#include <stdio.h>#include <stdlib.h>/**************************队列***********************/typedef struct {struct node *front;struct node *rear;}LinkQueue;LinkQueue *create_empty_queue(){struct node *head;LinkQueue *q;head = (struct node *)malloc(sizeof(struct node));hea.........【阅读全文】

阅读(930) | 评论(0) | 转发(0)

发布时间:2013-10-27 21:31:03

#include <stdio.h>#include <stdlib.h>/****************************栈*************************///栈头的类型typedef struct {//栈顶元素的位置struct node *top;//栈中元素的个数int n;}LinkStack;LinkStack *create_empty_stack(){LinkStack *s;s = (LinkStack *)malloc(sizeof(LinkStack.........【阅读全文】

阅读(882) | 评论(0) | 转发(0)

发布时间:2013-10-27 21:27:43

#include <stdio.h>#include <stdlib.h>#define MAX 5typedef int DATAYTYPE;//队列的结构体  typedef struct {//存放数据DATAYTYPE buf[MAX];//记录第一个元素的下标//出队的时候通过front出队int front;//记录最后一个元素的下标 //入队的时候通过rear入队int rear;}SeqQueue;//创建一.........【阅读全文】

阅读(526) | 评论(0) | 转发(0)

发布时间:2013-10-27 21:21:21

#include <stdio.h>#include <stdlib.h>#define MAX 10typedef int DATATYPE;//栈的结构体typedef struct{//存放栈中元素DATATYPE buf[MAX];//记录栈顶的位置int top;}SeqStack;//创建一个空栈SeqStack *create_empty_stack(){SeqStack *s;s = (SeqStack *)malloc(sizeof(SeqStack));s->top = -1;.........【阅读全文】

阅读(545) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册