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

洛阳数码大厦做网站的在几楼wordpress 中英文双语

洛阳数码大厦做网站的在几楼,wordpress 中英文双语,梧州论坛 红豆社区,网站登不上去的原因1、栈 1.1栈的概念及结构 栈时一种特殊的线性表#xff0c;只允许在固定的一端进行插入和删除元素操作。进行数据插入和删除操作的一端称为栈顶#xff0c;另一端称为栈底。栈中的数据元素遵守后进先出LIFO#xff08;Last In First Out#xff09;的原则。 1.2栈的基本实…1、栈 1.1栈的概念及结构 栈时一种特殊的线性表只允许在固定的一端进行插入和删除元素操作。进行数据插入和删除操作的一端称为栈顶另一端称为栈底。栈中的数据元素遵守后进先出LIFOLast In First Out的原则。 1.2栈的基本实现 栈的结构体定义 typedef int STDataType; typedef struct Stack {STDataType* a;int top;int capacity; }ST;栈的初始化 void STInit(ST* pst) {assert(pst);pst-a NULL;pst-top 0; //指向栈顶元素的下一个位置pst-capacity 0; } 栈的销毁 void STDestroy(ST* pst) {assert(pst);free(pst-a);pst-a NULL;pst-top 0;pst-capacity 0; } 入栈 void STPush(ST* pst, STDataType x) {if (pst-top pst-capacity){int newcapacity pst-capacity 0 ? 4 : pst-capacity * 2;STDataType* tmp (STDataType*)realloc(pst-a, newcapacity * sizeof(STDataType));if (tmp NULL){perror(realloc fail);return;}pst-a tmp;pst-capacity newcapacity;}pst-a[pst-top] x;pst-top; } 出栈 void STPop(ST* pst) {assert(pst);assert(!STEmpty(pst));pst-top--; } 栈顶元素 STDataType STTop(ST* pst) {assert(pst);assert(!STEmpty(pst));return pst-a[pst-top - 1]; } 判空 bool STEmpty(ST* pst) {assert(pst);return pst-top 0; } 栈的大小 int STSize(ST* pst) {assert(pst);return pst-top; } 2、队列 2.1队列的概念及结构 队列是只允许在一端进行插入数据操作在另一端进行删除数据操作的特殊线性表队列具有先进先出FIFO(First In First Out)的性质。 进行插入操作的一端称为队尾进行删除操作的一端称为队头。 2.2队列的基本实现 队列的结构体定义 typedef int QDataType; typedef struct QueueNode {struct QueueNode* next;QDataType data; }QNode;typedef struct Queue {QNode* phead;QNode* ptail;int size; }Queue;队列的基本操作 //队列初始化 void QueueInit(Queue* pq) {assert(pq);pq-phead NULL;pq-ptail NULL;pq-size 0; }//队列销毁 void QueueDestroy(Queue* pq) {assert(pq);QNode* cur pq-phead;while (cur){QNode* next cur-next;free(cur);cur next;}pq-phead pq-ptail NULL;pq-size 0; }//入队 void QueuePush(Queue* pq, QDataType x) {assert(pq);QNode* newnode (QNode*)malloc(sizeof(QNode));if (newnode NULL){perror(malloc fail\n);return;}newnode-data x;newnode-next NULL;if (pq-ptail NULL){assert(pq-phead NULL);pq-phead pq-ptail newnode;}else{pq-ptail-next newnode;pq-ptail newnode;}pq-size; }//出队 void QueuePop(Queue* pq) {assert(pq);assert(!QueueEmpty(pq));if (pq-phead-next NULL){//单个节点直接删除free(pq-phead);pq-phead pq-ptail NULL;}else{//多个节点相当于头删QNode* next pq-phead-next;free(pq-phead);pq-phead next;}pq-size--; }//队头元素 QDataType QueueFront(Queue* pq) {assert(pq);assert(!QueueEmpty(pq));return pq-phead-data; }//队尾元素 QDataType QueueBack(Queue* pq) {assert(pq);assert(!QueueEmpty(pq));return pq-ptail-data; }//队列长度 int QueueSize(Queue* pq) {assert(pq);return pq-size; }//队列判空 bool QueueEmpty(Queue* pq) {assert(pq);return pq-phead NULL pq-ptail NULL; }
http://www.zqtcl.cn/news/916187/

相关文章:

  • 班级网站建设开题报告在线音乐网站开发摘要
  • 昆山装饰公司网站建设wordpress olve
  • 重庆哪个区最繁华百度seo排名规则
  • 长春火车站高清图片网站商城微信支付宝支付宝支付接口
  • 市场体系建设司在官方网站支付宝手机网站支付
  • dedecms 模版网站网站图标下载
  • 余姚 做网站北京南站
  • 腾讯建设网站视频视频视频中国建筑信息平台
  • 关于政务网站建设的调查问卷搜狗网页版
  • 网站开发工程师优势宁波seo网站
  • 做网站用什么编程软件php网站中水印怎么做
  • p2网站模板做视频官方网站
  • 网站建设季度考核评价工作php做网站有哪些优点
  • 设计某网站的登录和注册程序凡科建站添加文章
  • wordpress 批量打印wordpress 数据库优化
  • 购物网站开发设计类图网络架构指什么
  • 学校网站建设方法wordpress 调用用户名
  • 深圳创建网站公司哈尔滨全员核酸检测
  • 网站开发实施计划宠物网站 html模板
  • 在线生成手机网站商城网站平台怎么做
  • 深圳专业企业网站制作哪家好写作网站新手
  • 福建泉州曾明军的网站桥梁建设期刊的投稿网站
  • 国内设计网站公司wordpress电视主题下载
  • 自贡网站开发河南省建设网站首页
  • 昆明网站推广优化服务器代理
  • wordpress 网站统计插件福建省建设工程职业注册网站
  • 手机移动端网站是什么上海网站设计服务商
  • 多语言网站建设推广孝感门户网
  • 外贸soho 网站建设旅游电子商务网站建设调查问卷
  • 北京专业制作网站seo优化技术教程