• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

尼古拉斯豆

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

2012年7月9日

数据结构--串--链式存储

摘要: #include <stdio.h>struct node{ char ch; struct node *next;};/* 1.初始化单链表*/void init(struct Node **h){ *h = (struct node *)mallov(sizeof(struct node)); if(*h == NULL) { printf("空间申请失败...\n"); system("pause"); } (*h)->next = NULL: return; }/* 2.将x节点插入到链表后*/... 阅读全文

posted @ 2012-07-09 15:38 尼古拉斯豆 阅读(243) 评论(0) 推荐(0)

数据结构--队列--链式存储

摘要: 队列一般叫优先级队列.这是跟它的相关应用有关的.#include <stdio.h>#include <stdlib.h> typedef int elemType;struct sNode{ /*队列节点*/ elemType data; struct sNode *next;};struct queueLK{ struct sNode *front; /*队列头指针*/ struct sNode *rear; /*队列尾指针*/};/* 1.初始化链队*/void initQueue(struct queueLK *hq)... 阅读全文

posted @ 2012-07-09 15:14 尼古拉斯豆 阅读(178) 评论(0) 推荐(0)

 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3