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

网站建设与管理是哪个软件免费建设个人手机网站

网站建设与管理是哪个软件,免费建设个人手机网站,苏州街网站建设,旅游景区网站建设方案文档✅作者#xff1a;简单^不简单 #x1f525;系列专栏#xff1a;C语言数据结构 #x1f496;如果文章有错误#xff0c;时刻欢迎大家的指正。当然觉得博主的文章还不错的话#xff0c;请点赞#x1f44d;收藏⭐️留言#x1f4dd; #x1f4ac;格言#xff1a;希望我… ✅作者简单^不简单 系列专栏C语言数据结构 如果文章有错误时刻欢迎大家的指正。当然觉得博主的文章还不错的话请点赞收藏⭐️留言 格言希望我们都能朝着光走‍‍‍‍ 目录 相关知识点         1.线性表         2.顺序表         3.链表 相关操作 1.定义数据结构 2.插入 2.1头插法 2.2尾插法 3.删除 完整代码 相关知识点 1.线性表 定义线性表 linear list 是 数据结构 的一种一个线性表是n个具有相同特性的数据元素的有限序列。特点          1.有限的序列         2.序列中的每一个元素都有唯一的前驱和后继 2.顺序表 分配一块连续的内存去存放这些元素例如编程语言中的素组。 3.链表 内存是不连续的元素会各自被分配一块内存内存和内存之间用指针进行相连。 本文重点对单链表的相关操作进行讲解 相关操作 1.定义数据结构 typedef struct Node{int data;struct Node* next; }Node;2.插入 2.1头插法 将头指针指向的节点赋值给新结点中next指向的节点再将头结点的next从新指向node //头插法 void headInsert(Node* list,int data){Node* node (Node*)malloc(sizeof(Node));node-data data;node-next list-next;list-next node;list-data; }2.2尾插法 创建一个新结点将值传入其中再将新结点的next—NULL,最后通过遍历找到以前的尾元素将尾元素的next指向该元素。 //尾插法 void tailInsert(Node* list,int data){Node* head list;Node* node (Node*)malloc(sizeof(Node));node-data data;node-next NULL;list list-next;while(list-next){list list-next;}list-next node;head-data; }3.删除 删除指定节点时要注意指针指向的节点是否为空之后便是进行扫描与交换数据域再之后就是进行断开释放空间等操作 void delete(Node* list,int data){Node* pre list;Node* current list-next;while(current){if(current-datadata){pre-next current-next;free(current);break;}pre current;current current-next;}list-data--; } 完整代码 #includestdio.h #includestdlib.h//开辟空间的头文件//定义数据结构 typedef struct Node{int data;struct Node* next; }Node;//初始化头节点 Node* initList(){Node* list (Node*)malloc(sizeof(Node));list-data 0;list-next NULL;return list;}//头插法 void headInsert(Node* list,int data){Node* node (Node*)malloc(sizeof(Node));node-data data;node-next list-next;list-next node;list-data; }//尾插法 void tailInsert(Node* list,int data){Node* head list;Node* node (Node*)malloc(sizeof(Node));node-data data;node-next NULL;list list-next;while(list-next){list list-next;}list-next node;head-data; }//删除操作 void delete(Node* list,int data){Node* pre list;Node* current list-next;while(current){if(current-datadata){pre-next current-next;free(current);break;}pre current;current current-next;}list-data--; }//遍历操作 void printList(Node* list){list list-next;while(list){printf(%d,list-data);list list-next;}printf(\n); }int main(){Node* list initList();headInsert(list,1);headInsert(list,2);headInsert(list,3);headInsert(list,4);headInsert(list,5);tailInsert(list,6);tailInsert(list,7);tailInsert(list,8);tailInsert(list,9);tailInsert(list,10);delete(list,5);delete(list,10);delete(list,3);printList(list);return 0;}
http://www.hkea.cn/news/14496818/

相关文章:

  • 池州网站建设哪家好淘宝网网页版首页登录入口
  • 郑州电子商务网站建设商城网站的开发怎么做
  • 如何k掉别人的网站如何用wordpress盈利
  • 做网站的公司 北京wordpress 用户访问记录
  • 酒店网站建设工作网站副标题怎么修改
  • 江门网站建设方案报价网站专题素材
  • 济南集团网站建设费用网站建设推广优化
  • 网站 大气公司取名软件
  • 建材公司网站建设案例wordpress网页的源代码在哪里
  • 深圳seo网站推广方案佛山网页设计
  • qq钓鱼网站制作免费网站推广咱们做
  • 丽江建设局网站国内目前比较好的crm系统
  • 网站开发公司 深圳电子商务网站建设与管理 项目任务 教材
  • 写网站编程需要什么南通外贸网站建设
  • 网站做多少分辨率Wordpress右侧返回顶部按钮
  • 怎么采集网站内容福州网站建设发布
  • 浙江网站建设方案wordpress3.9界面中文
  • 广州开发网站建设c 做精品课程网站
  • 上海外贸网站google建站腾讯云 个人网站
  • 响应式网站和营销型网站手游推广加盟
  • 景区网站建设策划方案ps 做ui比较好的网站有哪些
  • 案例分析网站山东泰安
  • 未备案网站如何加cdn招聘做网站专业人员
  • 关于网站建设的请示范文杭州建筑公司排名
  • 扬中本地网站视频制作软件免费版
  • 网站字体 font-family天河岗顶棠下上社网站建设设计
  • 网站推广有什么方法有哪些开发小程序怎么赚钱
  • 能源网站建设方案wordpress 角色 菜单
  • 龙华品牌网站建设网站多久被百度收录
  • 做网站要固定ip网络营销导向企业网站建设的一般原则是什么?