C语言
一代掌门
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
顺序栈的置空入栈出栈和返回栈顶元素
#include "stdio.h"#include "stdlib.h"#define MAXSIZE 100#define OK 1#define FALSE 0//顺序栈结构体typedef struct stack{int data[MAXSIZE];int top;}*pstack, stack;//置空顺序栈int empty(pst原创 2014-11-01 15:21:32 · 4050 阅读 · 0 评论 -
链栈的置空入栈,出栈,和返回栈顶元素操作
#include "stdio.h"#include "stdlib.h"#define N sizeof(struct stack)typedef struct stack{int data;struct stack *next;}*pstack;//置空链栈pstack empty(pstack top){top = NULL;print原创 2014-11-01 15:18:19 · 3039 阅读 · 0 评论 -
C语言实现链表的头插,尾插,插入,修改,删除和遍历
#include "stdio.h"#include "stdlib.h"#define N sizeof(struct node)//链表结构体typedef struct node{struct node *next;int data;}*pnode;//条件创建链表(头插)pnode create1(){pnode head,p,q;原创 2014-11-01 15:14:58 · 1392 阅读 · 0 评论 -
顺序队列的入队,出队,遍历队列计算队列的长度
#include "stdio.h"#include "stdlib.h"#define N 100#define TRUE 1#define FALSE 0typedef struct queue{int data[N];int front, rear;}*pqueue,lqueue;//置空队列int empty(pqueue p){原创 2014-11-02 17:48:34 · 9426 阅读 · 2 评论 -
二叉搜索树的创建及其遍历
#include using namespace std;//树的结构体typedef struct node{char data;struct node *left, *right;}*ptree,pnode;//搜索二叉树的根节点ptree creategen(char c){ptree t;t = (ptree)malloc(sizeof(原创 2014-11-25 11:09:09 · 605 阅读 · 0 评论 -
二叉搜索树之字符串的创建和遍历
#include #include using namespace std;//树的结构体typedef struct node{char data[20];struct node *left, *right;}*ptree, pnode;//搜索二叉树的根节点ptree creategen(char c[]){ptree t;t =原创 2014-11-25 18:07:37 · 903 阅读 · 0 评论 -
链队列的初始化,入队,出队,计算队的长度,遍历链队销毁队列
#include "stdio.h"#include "stdlib.h"typedef struct node{int data;struct node *next;}*pnode;typedef struct queue{pnode front;pnode rear;}*pqueue;//初始化队列pqueue init(pqueue原创 2014-11-02 17:53:02 · 10668 阅读 · 2 评论 -
二叉树的创建和递归遍历和非递归遍历
// 二叉树789.cpp : 定义控制台应用程序的入口点。//// 极限二叉树.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "stdio.h"#include "stdlib.h"#define maxsize 100//树的结构体typedef struct tree{c原创 2014-11-06 20:59:47 · 592 阅读 · 0 评论
分享