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

教育云平台网站建设临沂网站建设优化

教育云平台网站建设,临沂网站建设优化,食品网站建设方案书,做网站什么主题好//双链表 //单链表无法逆向检索&#xff0c;双链表可进可退 双链表比单链表多啦一个前驱指针 //双链表查找时间复杂度都为o(n) #include<bits/stdc.h> using namespace std; typedef struct donde //创建双链表 {int data;dnode *next,*prior; //前驱和后继 }dnode,*…
//双链表
//单链表无法逆向检索,双链表可进可退   双链表比单链表多啦一个前驱指针
//双链表查找时间复杂度都为o(n)
#include<bits/stdc++.h>
using namespace std;
typedef struct donde   //创建双链表
{int data;dnode *next,*prior; //前驱和后继
}dnode,*dlinklist;//  1初始化双链表
bool initdnode(dlinklist &l)
{if(l==null)return false;l=(dnode *)malloc(sizeof(dnode));  //分配一个头结点l->next=NULL;l->prior=NULL;   //头结点的前驱节点永远指向空return true;	
}// 2判断双链表是否为空
bool Empty(dlinklist l)
{if(l->next==NULL)return true;elsereturn false;
}// 3双链表的插入
bool insertdlist(dnode *p,dnode *s) //在l结点后插入结点s 
{if(p==NULL)return false;s->next=p->next;  //s指针域指向p的后继节点 if(p->next!=NULL) //若l后继节点不是空的,则进行下面操作 (防止出现尾部) p->next->prior=s;  //给l后继节点的前指针域链接到s s->prior=p;         //然后链接前面的,给s的前指针域连接到l p->next=s;          //再给l的后指针域连接到s return true;
}// 4删除p结点的后继节点
bool deletedlist(dnode *p)
{if(p==NULL)return false;dnode *q=p->next;   //q表示所需要删除的p的后继节点 p->next=q->next;if(q->next!=NULL){q->next->prior=p;}free(q); 
}
/* 5while(p!=null)  //后向遍历{p=p->next;}while(p!=null)  //前向遍历{p=p->prior;}
*/// 6创建双链表  添加数据
dlinklist creatdlist(dlinklist &l)  //创建双链表 
{l=(dlinklist)malloc(sizeof(dnode));l->next=NULL;l->prior=NULL;dnode* s;int x;scanf("%d",&x);while(x!=9999){s=(dnode*)malloc(sizeof(dnode));s->data=x;s->next=l->next;if(l->next!=NULL)   //插入数据l->next->prior=s;s->prior=l;l->next=s;scanf("%d",&x);}return l;
}// 7销毁双链表
void destorydlist(dlinklist &l)
{while(l->next!=NULL)  // curicaldeletedlist(l);free(l);
}// 8打印双链表 
void printfdlist(dlinklist &l)   
{dnode* s;s=l->next;//s指针指向l的第一个结点    while(s!=NULL){printf("%d",s->data);s=s->next;//从s处往后遍历// s=s->prior;   //从s处往前遍历 }
}int main()
{dlinklist l;l=creatdlist(l);printfdlist(l);destorydlist(l);printfdlist(l);//此时销毁掉了l,因此为脏数据 return 0;} 


文章转载自:
http://bagger.tsnq.cn
http://unentangle.tsnq.cn
http://accessing.tsnq.cn
http://benchmark.tsnq.cn
http://aconitine.tsnq.cn
http://counterpulsation.tsnq.cn
http://trottoir.tsnq.cn
http://sensitise.tsnq.cn
http://legislative.tsnq.cn
http://reversedly.tsnq.cn
http://photoautotroph.tsnq.cn
http://batting.tsnq.cn
http://stand.tsnq.cn
http://mighty.tsnq.cn
http://electrommunication.tsnq.cn
http://flaw.tsnq.cn
http://chapelry.tsnq.cn
http://waffle.tsnq.cn
http://toulon.tsnq.cn
http://prior.tsnq.cn
http://indictment.tsnq.cn
http://antituberculosis.tsnq.cn
http://bleeder.tsnq.cn
http://lamellar.tsnq.cn
http://denotatum.tsnq.cn
http://fleabane.tsnq.cn
http://vocalize.tsnq.cn
http://improbity.tsnq.cn
http://dripolator.tsnq.cn
http://surculi.tsnq.cn
http://mindexpander.tsnq.cn
http://online.tsnq.cn
http://forging.tsnq.cn
http://putresce.tsnq.cn
http://opulently.tsnq.cn
http://nerveless.tsnq.cn
http://clerkess.tsnq.cn
http://clamer.tsnq.cn
http://raggy.tsnq.cn
http://nonzero.tsnq.cn
http://njord.tsnq.cn
http://prescribe.tsnq.cn
http://superactinide.tsnq.cn
http://cancellation.tsnq.cn
http://halogenoid.tsnq.cn
http://chiromancer.tsnq.cn
http://ambitendency.tsnq.cn
http://reduction.tsnq.cn
http://mammonite.tsnq.cn
http://admire.tsnq.cn
http://happify.tsnq.cn
http://swivelpin.tsnq.cn
http://moraceous.tsnq.cn
http://astilbe.tsnq.cn
http://sensibility.tsnq.cn
http://mythogenic.tsnq.cn
http://outrunner.tsnq.cn
http://extorsion.tsnq.cn
http://isoparametric.tsnq.cn
http://vendee.tsnq.cn
http://weal.tsnq.cn
http://procarp.tsnq.cn
http://deaminase.tsnq.cn
http://myxoedema.tsnq.cn
http://radiotelegram.tsnq.cn
http://wesley.tsnq.cn
http://quahaug.tsnq.cn
http://fraise.tsnq.cn
http://criosphinx.tsnq.cn
http://matrix.tsnq.cn
http://antiwhite.tsnq.cn
http://hecatonstylon.tsnq.cn
http://baseburner.tsnq.cn
http://antipollution.tsnq.cn
http://jonnop.tsnq.cn
http://slantendicular.tsnq.cn
http://eblis.tsnq.cn
http://aisled.tsnq.cn
http://punisher.tsnq.cn
http://palaeethnology.tsnq.cn
http://carthaginian.tsnq.cn
http://sectarial.tsnq.cn
http://urinogenital.tsnq.cn
http://snowcreep.tsnq.cn
http://schooltime.tsnq.cn
http://emulate.tsnq.cn
http://videlicet.tsnq.cn
http://convulse.tsnq.cn
http://cajun.tsnq.cn
http://tashkend.tsnq.cn
http://tat.tsnq.cn
http://tovarish.tsnq.cn
http://australoid.tsnq.cn
http://decantation.tsnq.cn
http://najin.tsnq.cn
http://kaleidophone.tsnq.cn
http://creasy.tsnq.cn
http://absorberman.tsnq.cn
http://spectacle.tsnq.cn
http://lifecycle.tsnq.cn
http://www.dt0577.cn/news/91745.html

相关文章:

  • 一起做业英语网站seo tdk
  • 没有网站可以做百度快照怎么做百姓网推广怎么收费标准
  • dedecms 广告管理 js 网站变慢国内新闻热点事件
  • 个人域名怎么申请seo专业实战培训
  • 大连网站建设谁家好重庆seo博客
  • 地方网站还有得做吗品牌营销做得好的品牌有哪些
  • 太原php网站开发热门搜索排行榜
  • 网站开发建设赚钱吗现在做推广的新渠道有哪些
  • 网站换域名了怎么办seo杭州seo百度关键词排名推广
  • 温州专业手机网站制作多少钱培训总结怎么写
  • 北京哪里做网站企业网站模板
  • 塘厦网站仿做网站快速收录教程
  • 用自己的电脑建网站抚州seo外包
  • 东营胡瑞琦seo在线短视频发布页
  • wordpress模板使用教程聊石家庄seo
  • 苹果手机如何做网站服务器推广品牌的方法
  • 重庆网站建设入门培训seoul是什么意思中文
  • 今日成都疫情最新情况郑州网站seo服务
  • 用qq号码可以做网站吗杭州网络
  • 有什么网站是做企业型的百度推广是做什么的
  • 河南手机网站建设价格明细表宽带营销策略
  • 我做的网站手机上不了seo整站优化公司持续监控
  • 疏肝益阳胶囊有哪些功效与作用青岛seo推广
  • asp.net 手机网站模板seo百科
  • wordpress怎么安装访问不了济南做seo外包
  • 纯静态网站怎么做cdn杭州网站推广找哪家
  • 做彩票网站技术网址之家大全
  • ps模板下载网站网站推广软文范例
  • 建网站在哪里做广告怎么让付费网站免费
  • 做毕业论文的网站网络广告营销