当前位置: 首页 > news >正文

网站里的滚动怎么做成人本科

网站里的滚动怎么做,成人本科,wordpress更新是乱码,用什么wordpress主题队列的基本概念 只允许在一端进行插入数据操作,在另一端进行删除数据操作的特殊线性表,队列具有先进先出 入队列:进行插入操作的一端称为队尾 出队列:进行删除操作的一端称为队头 队列用链表实现 队列的实现 队列的定义 队列…

队列的基本概念

只允许在一端进行插入数据操作,在另一端进行删除数据操作的特殊线性表,队列具有先进先出

入队列:进行插入操作的一端称为队尾

出队列:进行删除操作的一端称为队头

队列用链表实现

队列的实现

队列的定义

队列初始化

入队

出队

判断队列是否为空

销毁

队头数据

队尾数据

队列数据

运行调试

完整代码

Queue.h

#pragma once#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <stdbool.h>typedef int QDataType;typedef struct QueueNode
{struct QueueNode* next;QDataType data;
}QNode;typedef struct Queue
{QNode* head;QNode* tail;int size;
}Que;void QueueInit(Que* pst);     //初始化队列void QueuePush(Que* pst,QDataType x);     //入队void QueuePop(Que* pst);          //出队bool QueueEmpty(Que* pst);          //判断队列是否为空int QueueSize(Que* pst);      //队列数据QDataType QueuBack(Que* pst);      //队尾数据QDataType QueueFront(Que* pst);       //队头数据void QueueDestroy(Que* pst);        //销毁队列

Queue.c

#define _CRT_SECURE_NO_WARNINGS 1#include "Queue.h"void QueueInit(Que* pst)     //初始化队列
{assert(pst);pst->head = NULL;pst->tail = NULL;pst->size = 0;}void QueuePush(Que* pst, QDataType x)     //入队
{assert(pst);QNode* newnode = (QNode*)malloc(sizeof(QNode));if (newnode == NULL){perror("malloc failed");exit(-1);}newnode->data = x;newnode->next = NULL;if (pst->tail == NULL){pst->head = newnode;pst->tail = newnode;}else{pst->tail->next = newnode;pst->tail = newnode;}pst->size++;
}void QueuePop(Que* pst)          //出队
{//队列为空assert(pst);assert(!QueueEmpty(pst));//队列只有一个元素if (pst->head->next == NULL){free(pst->head);pst->head = pst->tail = NULL;}//队列多个元素else{QNode* del = pst->head;pst->head = pst->head->next;free(del);}pst->size--;
}bool QueueEmpty(Que* pst)          //判断队列是否为空
{assert(pst);return pst->head == NULL;
}void QueueDestroy(Que* pst)        //销毁队列
{assert(pst);QNode* cur = pst->head;while (cur){QNode* next = cur->next;free(cur);cur = next;}pst->head = NULL;pst->tail = NULL;pst->size = 0;
}QDataType QueueFront(Que* pst)        //队头数据
{assert(pst);assert(!QueueEmpty(pst));return pst->head->data;
}QDataType QueuBack(Que* pst)      //队尾数据
{assert(pst);assert(!QueueEmpty(pst));return pst->tail->data;
}int QueueSize(Que* pst)      //队列数据
{assert(pst);return pst->size;
}

http://www.hkea.cn/news/396214/

相关文章:

  • 汉川网站建设sem代运营
  • 装酷网装修平台东莞seo外包
  • 专门做图片的网站吗如何建网站要什么条件
  • 卢氏县住房和城乡建设局网站站长统计 站长统计
  • 济南 网站制作旺道营销软件
  • 新上线网站如何做搜索引擎站长素材网站
  • 做网站编辑深圳疫情防控最新消息
  • PHP网站开发项目式教程google下载手机版
  • 国外专门用于做网站图片的做网站要多少钱
  • 网站维护费用计入什么科目媒介星软文平台官网
  • 网站建设seo 视频做网站哪个平台好
  • 旅行社网站建设方案论文百度seo公司
  • 长沙网站建设与维护百度开户联系方式
  • 做pcr查基因序列的网站南京百度网站快速优化
  • 数据服务网站策划方案关键词快速优化排名软件
  • 响应式网站缺点学大教育培训机构电话
  • 江苏天德建设工程有限公司网站一个平台怎么推广
  • 石家庄做网络推广的网站推广平台收费标准
  • 贵阳天柱网站建设招聘域名注册平台有哪些
  • 网站建设电话营销百度问一问官网
  • 网站优化建设河南怎么关闭seo综合查询
  • 自贡做响应式网站开发公司google搜索引擎入口google
  • 东莞哪种网站推广好微信朋友圈推广文案
  • 现在学做网站赚钱吗东莞市优速网络科技有限公司
  • 宁津做网站公司宣传推广图片
  • 陕西的建设厅官方网站数据分析报告
  • 企业网站建设的定位互联网
  • 注册域名之后如何做网站优化清理大师
  • wordpress+在线播放推广seo网站
  • 丽水网站建设明恩玉杰网站开发框架