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

卖号交易网站怎么做网站收录怎么做

卖号交易网站怎么做,网站收录怎么做,网站建设公司找哪里,wordpress弹窗公告单向链表 typedef int datatype; //由于有效数据不一定是正数,所以将数据重命名。typedef struct lklst{ //不能是无名结构体了,因为定义指针域的时候需要使用union{int len; //头结点时候使用;datatype data; …

 单向链表

typedef int datatype;   //由于有效数据不一定是正数,所以将数据重命名。typedef struct lklst{   //不能是无名结构体了,因为定义指针域的时候需要使用union{int len;                   //头结点时候使用;datatype data;           //有效数据结点时候使用;}text;                   //数据域,存储数据struct lklst *next;     //指针域,指向下一个结点,存储下一个结点的首地址
}Linklist;

创建空的单链表

Linklist * createlinklist(void){//在堆空间中申请头结点//判断是否生成 成功Linklist *link=(Linklist*) malloc(sizeof(Linklist));//malloc申请堆空间,返回的是void*类型所以需要强转成需要的类型if(link == NULL){printf("堆空间申请失败");return NULL;}link->next=NULL;link->text.len=0;return link;
}

头插

//头插法插入数据
void insert_linklistByHead(Linklist *head,datatype data){//创建节点Linklist * temp=(Linklist*) malloc(sizeof(Linklist));if(temp == NULL){printf("堆空间申请失败");return ;}temp->next=NULL;temp->text.data=data;//temp->next=head->next;head->next=temp;//更新头节点数据的长度head->text.len++;return;
}

尾插

//尾插法插入数据
void insert_linklistByEnd(Linklist *head,datatype data){//创建节点Linklist * temp=(Linklist*) malloc(sizeof(Linklist));if(temp == NULL){printf("堆空间申请失败");return ;}temp->next=NULL;temp->text.data=data;Linklist * read =head;//找到尾节点while(read->next!=NULL){read =read->next;}read->next=temp;//更新长度head->text.len++;
}

按位置插入

//按位置插入
void insert_linklistByPosition(Linklist *head,datatype data,int n) {if (n < 1) {printf("非法数据\n");return;}Linklist *p = head;for (int i=0;i<n-1;i++) {p=p->next;if(p==NULL){printf("非法数据\n");return;}}Linklist * temp=(Linklist*) malloc(sizeof(Linklist));if(temp == NULL){printf("堆空间申请失败");return ;}temp->text.data=data;temp->next = NULL;
//将temp插入到p结点的后一个位置temp->next=p->next;temp->text.data=data;p->next=temp;//更新长度head->text.len++;return;
}

头删

void delete_linklistByHead(Linklist *head){//判断链表是否为空if(head->next==NULL)return;//先将要释放的结点地址另存Linklist * temp = head->next;//要释放结点中存储下一个结点的地址,给头结点head->next=temp->next;//释放结点free(temp);temp=NULL;//更新长度head->text.len--;return ;
}

尾删

//尾删
void delete_linklistByEnd(Linklist *head){//判断链表是否为空if(head->next==NULL)return;//寻找倒数第二个结点Linklist * temp =head;while(temp->next->next != NULL) {temp = temp->next;}//释放结点free(temp->next);temp->next = NULL;//更新长度head->text.len--;
}

按位置删除

//按位置删除
void delete_linklistByPosition(Linklist *head,int n){if(head->next==NULL){printf("非法数据\n");return;}if(n<1){printf("非法数据\n");return;}//找到要删除结点的前一个节点位置Linklist* p = head;for(int i=0;i<n-1;i++)p=p->next;if(NULL == p->next){printf("n=%d删除位置非法\n",n);return;}//能运行到这个位置,则说明p指向的是要删除的结点的前一个位置Linklist* temp = p->next;p->next = temp->next;free(temp);temp = NULL;//更新长度head->text.len++;return ;
}

 遍历链表

//遍历链表
void Iterative_list(Linklist *head){//读头节点的数据Linklist * read =head;while(read->next!=NULL){read =read->next;datatype data = read->text.data;printf("%d\t",data);}putchar(10);
}


单向循环链表

typedef int datatype;   //由于有效数据不一定是正数,所以将数据重命名。typedef struct loopklst{   //不能是无名结构体了,因为定义指针域的时候需要使用union{int len;                   //头结点时候使用;datatype data;           //有效数据结点时候使用;}text;                   //数据域,存储数据struct loopklst *next;     //指针域,指向下一个结点,存储下一个结点的首地址
}LoopLinklist;
//创建一个空的单链表
LoopLinklist * create_recurringlinklist(void) {LoopLinklist * head = (LoopLinklist *) malloc(sizeof(LoopLinklist));if (NULL == head){printf("单向循环链表创建失败\n");return NULL;}head->text.len =0;//头结点中记录的链表长度赋值为0head->next =head;//将指针域指向自己return head;
}

头插

//头插
void insert_recurringlinklistByHead(LoopLinklist *head,datatype data){//创建节点LoopLinklist * temp=(LoopLinklist*) malloc(sizeof(LoopLinklist));LoopLinklist * p=head;if(temp == NULL){printf("堆空间申请失败");return ;}temp->text.data=data;temp->next=p->next;head->next=temp;//更新头节点数据的长度head->text.len++;return;
}

尾插

//尾插
void insert_recurringlinklistByEnd(LoopLinklist *head,datatype data){LoopLinklist *temp=(LoopLinklist *) malloc(sizeof (LoopLinklist ));if(temp==NULL){printf("创建失败");return;}LoopLinklist * p=NULL;p=head;while(p->next!=head){p=p->next;}temp->next=head;temp->text.data=data;p->next=temp;head->text.len++;return;
}

按位置插入

void insert_recurringlinklistByPosition(LoopLinklist *head,datatype data,int n){if (n < 1) {printf("非法数据\n");return;}LoopLinklist *p = head;for (int i=0;i<n-1;i++) {p=p->next;if(p==NULL){printf("非法数据\n");return;}}LoopLinklist * temp=(LoopLinklist*) malloc(sizeof(LoopLinklist));if(temp == NULL){printf("堆空间申请失败");return ;}temp->text.data=data;temp->next = NULL;//将temp插入到p结点的后一个位置temp->next=p->next;temp->text.data=data;p->next=temp;//更新长度head->text.len++;return;
}

头删

//头删
void delete_recurringlinklistByHead(LoopLinklist *head){LoopLinklist *temp=head->next;if(head->next==head){printf("链表为空,删除失败");return;}temp=temp->next;free(head->next);head->next=temp;return;
}

尾删

//尾删
void delete_recurringlinklistByEnd(LoopLinklist *head){//判断链表是否为空LoopLinklist *p=head;if(head->next==head){printf("链表为空");return;}//找到倒数第二个结点while(p->next->next!=head){p=p->next;}//free(p->next);p->next=head;//更新长度head->text.len--;return;
}

按位置删除

//位置删除
void delete_recurringlinklistByPosition(LoopLinklist *head,int n){if(head->next==head){printf("非法数据\n");return;}if(n<1){printf("非法数据\n");return;}//找到要删除结点的前一个节点位置LoopLinklist* p = head;for(int i=0;i<n-1;i++)p=p->next;if(p->next==head){printf("n=%d删除位置非法\n",n);return;}//能运行到这个位置,则说明p指向的是要删除的结点的前一个位置LoopLinklist* temp = p->next;p->next = temp->next;free(temp);temp = NULL;//更新长度head->text.len++;return ;
}

遍历链表

//遍历循环单向链表
void Iterative_recurringlinklist(LoopLinklist *head){//读头节点的数据LoopLinklist * read =head;while(read->next!=head){read =read->next;datatype data = read->text.data;printf("%d\t",data);}putchar(10);
}

双向链表

typedef int datatype;   //由于有效数据不一定是正数,所以将数据重命名。typedef struct Dublinklist{   //不能是无名结构体了,因为定义指针域的时候需要使用union{int len;                   //头结点时候使用;datatype data;           //有效数据结点时候使用;}text;                   //数据域,存储数据struct loopklst *prev;  //指针域,指向上一个结点,存储上一个结点的首地址struct loopklst *next;     //指针域,指向下一个结点,存储下一个结点的首地址
}Dublist;
Dublist * create_Dublinklist(void){//判断是否生成 成功Dublist *link=(Dublist*) malloc(sizeof(Dublist));//malloc申请堆空间,返回的是void*类型所以需要强转成需要的类型if(link == NULL){printf("堆空间申请失败");return NULL;}link->prev=NULL;link->next=NULL;link->text.len=0;return link;
}

头插

void insert_DublistByHead(Dublist *head,datatype data){Dublist *temp=(Dublist *) malloc(sizeof (Dublist));if(temp==NULL){printf("堆空间申请失败");return;}Dublist *p=head;temp->text.data=data;//nexttemp->next=head->next;head->next=temp;//prvetemp->prev=head;if(temp->next!=NULL){temp->next->prev=temp;}head->text.len++;return;
}

尾插

void insert_DublistByEnd(Dublist *head,datatype data){Dublist *temp=(Dublist *) malloc(sizeof (Dublist));if(temp==NULL){printf("堆空间申请失败");return;}Dublist *p=head;temp->text.data=data;//找尾部的位置while(p->next!=NULL){p=p->next;}//nexttemp->next=p->next;p->next=temp;//prvetemp->prev=p;//更新长度head->text.len++;return;
}

按位置插入

//按位置插入
void insert_DublistByPosition(Dublist *head,datatype data,int n) {if (n < 1) {printf("非法数据\n");return;}Dublist *p = head;for (int i=0;i<n-1;i++) {p=p->next;if(p==NULL){printf("非法数据\n");return;}}Dublist * temp=(Dublist*) malloc(sizeof(Dublist));if(temp == NULL){printf("堆空间申请失败");return ;}temp->text.data=data;temp->next = NULL;
//将temp插入到p结点的后一个位置temp->next=p->next;temp->text.data=data;p->next=temp;//更新长度head->text.len++;return;
}

头删

//头删
void delete_DublistByHead(Dublist *head){if(head->next==NULL){printf("非法数据\n");return;}Dublist * temp=head->next;head->next=temp->next;head->next->prev=head;free(temp);temp=NULL;return;
}

尾删

void delete_DublistByEnd(Dublist *head){Dublist * p=head;//判断链表是否为空if(head->next==NULL)return;//寻找倒数第二个结点Dublist * temp =head;while(temp->next->next != NULL) {temp = temp->next;}//释放结点free(temp->next);temp->next = NULL;//更新长度head->text.len--;return;
}

按位置删除

//按位置删除
void delete__DublistByPosition(Dublist*head,int n){if(head->next==NULL){printf("非法数据\n");return;}if(n<1){printf("非法数据\n");return;}//找到要删除结点的前一个节点位置Dublist* p = head;for(int i=0;i<n-1;i++)p=p->next;if(NULL == p->next){printf("n=%d删除位置非法\n",n);return;}//能运行到这个位置,则说明p指向的是要删除的结点的前一个位置Dublist* temp = p->next;p->next = temp->next;free(temp);temp = NULL;//更新长度head->text.len++;return ;
}


 


文章转载自:
http://dinncomensuration.knnc.cn
http://dinncoroup.knnc.cn
http://dinncorambunctiously.knnc.cn
http://dinncochelsea.knnc.cn
http://dinncobasho.knnc.cn
http://dinncozymogen.knnc.cn
http://dinncoarchaeopteryx.knnc.cn
http://dinncofactualist.knnc.cn
http://dinncodogmatic.knnc.cn
http://dinncosummate.knnc.cn
http://dinncoantebrachium.knnc.cn
http://dinncosoymilk.knnc.cn
http://dinncohorologii.knnc.cn
http://dinncoprudentialist.knnc.cn
http://dinncoistanbul.knnc.cn
http://dinncodengue.knnc.cn
http://dinncoketogenic.knnc.cn
http://dinncodiastolic.knnc.cn
http://dinncoasway.knnc.cn
http://dinncowiden.knnc.cn
http://dinncouproarious.knnc.cn
http://dinncoragazza.knnc.cn
http://dinncorecorder.knnc.cn
http://dinncobusboy.knnc.cn
http://dinncoluchuan.knnc.cn
http://dinncohydrophobia.knnc.cn
http://dinncotailfan.knnc.cn
http://dinncotrijugate.knnc.cn
http://dinncobelt.knnc.cn
http://dinncohapless.knnc.cn
http://dinncohardmouthed.knnc.cn
http://dinncoaffine.knnc.cn
http://dinncoammonolysis.knnc.cn
http://dinnconecrophily.knnc.cn
http://dinncoepicoracoid.knnc.cn
http://dinncorick.knnc.cn
http://dinncoantidiuresis.knnc.cn
http://dinncomonogamic.knnc.cn
http://dinncoimprimis.knnc.cn
http://dinncophototherapeutics.knnc.cn
http://dinncosoftening.knnc.cn
http://dinncofragrance.knnc.cn
http://dinnconeurovascular.knnc.cn
http://dinncocolossians.knnc.cn
http://dinncoenthalpy.knnc.cn
http://dinncoboiloff.knnc.cn
http://dinncobarony.knnc.cn
http://dinncosquirish.knnc.cn
http://dinncocorvina.knnc.cn
http://dinncosilique.knnc.cn
http://dinncohelio.knnc.cn
http://dinncodenature.knnc.cn
http://dinncoceltic.knnc.cn
http://dinncoupdating.knnc.cn
http://dinncoushership.knnc.cn
http://dinncouproar.knnc.cn
http://dinncoproneur.knnc.cn
http://dinncovermiform.knnc.cn
http://dinncounifactorial.knnc.cn
http://dinncojadeite.knnc.cn
http://dinncosaxtuba.knnc.cn
http://dinncominder.knnc.cn
http://dinncoaggressive.knnc.cn
http://dinncopsychotic.knnc.cn
http://dinncosedge.knnc.cn
http://dinncooxide.knnc.cn
http://dinncocompression.knnc.cn
http://dinncoamalgamation.knnc.cn
http://dinncouseable.knnc.cn
http://dinncohysterology.knnc.cn
http://dinncoenvy.knnc.cn
http://dinncoadjure.knnc.cn
http://dinncotrainer.knnc.cn
http://dinncoyoungish.knnc.cn
http://dinncodialogically.knnc.cn
http://dinncorebeldom.knnc.cn
http://dinncocontrite.knnc.cn
http://dinncoabiochemistry.knnc.cn
http://dinncopuppetry.knnc.cn
http://dinncoguacharo.knnc.cn
http://dinncouncalculated.knnc.cn
http://dinncointeriorly.knnc.cn
http://dinncoinhibitory.knnc.cn
http://dinncoturnup.knnc.cn
http://dinncounequalable.knnc.cn
http://dinncodomesticable.knnc.cn
http://dinncoafforestation.knnc.cn
http://dinncolasher.knnc.cn
http://dinncooffenseful.knnc.cn
http://dinncomandeville.knnc.cn
http://dinncoattorn.knnc.cn
http://dinnconore.knnc.cn
http://dinncocolessee.knnc.cn
http://dinnconeighbouring.knnc.cn
http://dinncotermless.knnc.cn
http://dinncostay.knnc.cn
http://dinncomisdescription.knnc.cn
http://dinncoamend.knnc.cn
http://dinncojellied.knnc.cn
http://dinncorindless.knnc.cn
http://www.dinnco.com/news/119991.html

相关文章:

  • 福州网站设计软件公司seo教学
  • 网站流量太大安徽网站关键字优化
  • 有哪些做淘宝素材的网站有哪些搜索关键词的工具
  • 长春网站关键词推广百度推广产品
  • 标准化信息网站建设与应用源码时代培训机构官网
  • 咖啡网站开发seo泛目录培训
  • 西安网站设计哪家公司好品牌咨询
  • 山亭 网站建设郑州整站关键词搜索排名技术
  • 长春哪些企业没有网站真正免费的网站建站平台运营
  • 淅川网站建设浏览器下载安装2022最新版
  • 网页设计什么软件seo哪家强
  • 怎么做网店网站青岛seo外包服务
  • 买网站的域名搜索引擎优化排名案例
  • 国外h5制作网站重庆seo技术教程
  • 查询网站的二级域名百度惠生活怎么优化排名
  • 政府网站建设管理考核办法黄页网络的推广网站有哪些软件
  • 境内境外网站区别花关键词排名系统
  • 可以做qq空间背景音乐的网站品牌营销策划怎么写
  • 网站系统评测要怎么做呢在线服务器网站
  • 动漫网站logo沈阳线上教学
  • wordpress企业网站建设西安seo外包平台
  • 做网站服务器e3网站推广具体内容
  • 凡科网登陆优化系统
  • 家具网站的建设营销软件哪个好
  • 惠东网站设计工业设计公司
  • 网站空间租建站优化推广
  • 网站建设资讯平台长沙百度网站优化
  • 怎么做qq业务网站上海网站搜索排名优化哪家好
  • 怎么购买域名自己做网站站长之家站长工具
  • 网站建设师可以推广的软件有哪些