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

网站上的高清图怎么做个人网站备案内容

网站上的高清图怎么做,个人网站备案内容,it运维管理软件排名,找方案的网站单向环形链表的创建与单向链表的不同在于#xff0c;最后一个节点的next需要指向头结点#xff1b; 判断链表是否带环#xff0c;只需要使用两个指针#xff0c;一个步长为1#xff0c;一个步长为2#xff0c;环状链表这两个指针总会相遇。 如下示例代码#xff1a; l…        单向环形链表的创建与单向链表的不同在于最后一个节点的next需要指向头结点 判断链表是否带环只需要使用两个指针一个步长为1一个步长为2环状链表这两个指针总会相遇。 如下示例代码 list.h #ifndef LIST_H__ #define LIST_H__typedef struct _listNode {int data;struct _listNode *next; }listNode_t;typedef struct _list {int size;listNode_t *head; }list_t; #endiflist.c #include stdio.h #include stdlib.h #include stdbool.h #include list.hlist_t *listCreate(void) {list_t *list (list_t *)malloc(sizeof(list_t));if(list NULL) {perror(malloc :);exit(-1);}list-size 0;list-head NULL;return list; }int listInsertHead(list_t *list, int dat) {listNode_t *pNode (listNode_t *)malloc(sizeof(listNode_t));if(pNode NULL) {perror(malloc :);exit(-1);}pNode-data dat;pNode-next NULL;listNode_t *headNode list-head;if(headNode NULL) {list-head pNode;pNode-next list-head; //pNode作为头结点同时pNode的next指向头结点构成环状} else {pNode-next list-head; //在头部插入新的节点//找到末尾的节点将末尾节点的next指向新的节点。while(headNode-next ! list-head) {headNode headNode-next;}headNode-next pNode;//头结点指向新的节点list-head pNode;}list-size ;return 0; } bool listIsLoop(list_t *list) {//如果链表是环状的fast和slow总会相遇listNode_t *fast list-head;listNode_t *slow list-head;if(list-head NULL || list-head-next NULL) {return false;}while(fast-next-next ! NULL || slow-next ! NULL) {if(fast slow) {return true;}}return false; }void listDump(list_t *list) {listNode_t *temp list-head;//这里可以验证链表是不是环状的将size改为两倍大小看是否循环输出while(list-size) {printf(%d- , temp-data);temp temp-next;list-size --;}printf(\n);return ; } int main() {list_t *list listCreate();for(int i 0; i 5; i) {listInsertHead(list, i);}listDump(list);printf(list %s loop\n, listIsLoop(list)? is : is not );return 0;
http://www.dnsts.com.cn/news/275286.html

相关文章:

  • 做网站公司哪里好广州化妆品网站建设公司排名
  • 石景山网站建设公司排行凡科企业网站如何建设
  • 衡水做网站设计wordpress字符图标
  • 专做水果的社区网站做百度网站一年多少钱
  • 建设银行招标网站搭建平台 提供舞台
  • 网站开发后台框架网站关于我们怎么做单页面
  • 建站快车凡科wordpress后台 登录
  • 上海做网站公司排名cvm服务器
  • 上海松江建设银行网站自己建设网站麻烦吗
  • 营销型网站建设知识wordpress优化记录
  • 建设一个淘宝客网站建立企业网站要多少钱
  • 兴义网站网站建设wordpress怎么登入
  • 如何推广公司网站住院证明图片在线制作
  • 建立网站预算杭州论坛网站建设
  • 查看企业信息的网站甜品售卖网站网页设计
  • 17做网站 一件代发青岛建站开发
  • 华大基因 建设公司网站网站开发如何处理兼容性问题
  • 网站建设学校培训班网页搜索关键词
  • 网站维护是做什么的网站主页特效欣赏
  • 织梦做的网站被黑了极构网站建设工作室
  • 做的好的网站营销微信公众号提升wordpress访问速度
  • 网站做接口到app 价格wordpress中文广告插件下载
  • 网站备案需要关闭wordpress自定义字段怎么用
  • 网站开发用什么图片格式最好网站设计 html5
  • 网站维护界面张家界做网站的
  • 网站上传wordpresswordpress 代码生成
  • gif网站素材东莞推广软件
  • 泊头网站建设甘肃查看网站开通时间
  • 网站权重接口温州营销网站公司电话
  • 网站模板自助郑州做网站元辰