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

html个人网站模板深圳网站优化提供商

html个人网站模板,深圳网站优化提供商,北京南站官网,做网站的时候说需求的专业术语2.单循环链表 data|next——data|next——data|next——头节点 1.初始化链表 2.增加节点#xff08;头插法、尾插法#xff09; 3.删除节点 4.遍历链表 定义一个结构体#xff0c;存放data域和指针域#xff1a; typedef struct Node {//定义一个结构体… 2.单循环链表 data|next——data|next——data|next——头节点 1.初始化链表 2.增加节点头插法、尾插法 3.删除节点 4.遍历链表 定义一个结构体存放data域和指针域 typedef struct Node {//定义一个结构体存放data域和指针域int data;//数据域类型struct Node* next; }Node; 初始化链表 Node* initList() {//初始化链表Node* L (Node*)malloc(sizeof(Node));L-data 0;L-next L;return L; } 头插法 void headInsert(Node* L, int data) {//头插法Node* node (Node*)malloc(sizeof(Node));node-data data;node-next L-next;L-next node; } 尾插法 void tailInsert(Node* L, int data) {//尾插法Node* n L;Node* node (Node*)malloc(sizeof(Node));node-data data;while (n-next ! L) {n n-next;}node-next L;n-next node; } 删除 int Delete(Node* L, int data)//删除 {Node* preNode L;Node* node L-next;while (node ! L){if (node-data data) {//deletepreNode-next node-next;free(node);return true;}preNode node;node node-next;}return false; } 遍历链表 void printList(Node* L) {//遍历链表Node* node L-next;while (node ! L) {printf(%d-, node-data);node node-next;}printf(NULL\n); } main函数 int main() {Node* L initList();headInsert(L, 1);headInsert(L, 2);headInsert(L, 3);headInsert(L, 4);headInsert(L, 5);tailInsert(L, 6);tailInsert(L, 7);tailInsert(L, 8);tailInsert(L, 9);tailInsert(L, 10);printList(L);Delete(L, 4);Delete(L, 5);printList(L);return 0; } 单循环链表函数 typedef struct Node {//定义一个结构体存放data域和指针域int data;//数据域类型struct Node* next; }Node;Node* initList() {//初始化链表Node* L (Node*)malloc(sizeof(Node));L-data 0;L-next L;return L; }void headInsert(Node* L, int data) {//头插法Node* node (Node*)malloc(sizeof(Node));node-data data;node-next L-next;L-next node; }void tailInsert(Node* L, int data) {//尾插法Node* n L;Node* node (Node*)malloc(sizeof(Node));node-data data;while (n-next ! L) {n n-next;}node-next L;n-next node; }int Delete(Node* L, int data)//删除 {Node* preNode L;Node* node L-next;while (node ! L){if (node-data data) {//deletepreNode-next node-next;free(node);return true;}preNode node;node node-next;}return false; }void printList(Node* L) {//遍历链表Node* node L-next;while (node ! L) {printf(%d-, node-data);node node-next;}printf(NULL\n); }int main() {Node* L initList();headInsert(L, 1);headInsert(L, 2);headInsert(L, 3);headInsert(L, 4);headInsert(L, 5);tailInsert(L, 6);tailInsert(L, 7);tailInsert(L, 8);tailInsert(L, 9);tailInsert(L, 10);printList(L);Delete(L, 4);Delete(L, 5);printList(L);return 0; }
http://www.hkea.cn/news/14296198/

相关文章:

  • 做数学ppt工具的网站酒泉网站建设推广
  • 一个虚拟主机如何建多个网站代码计算机专业都学什么
  • 新乡电子商务网站建设1千元以下做网站的公司
  • 旅游景区网站建设方案wordpress运费
  • 免费手机网站模板网站开发国内外研究动态
  • 金融中介做网站需要淮南营销型网站建设怎么样
  • asp.net网站开发四酷全书怎么seo网站关键词优化
  • 网站建设求职要求中铁建设集团有限公司门户网登录入口
  • 造价师证书在建设部网站查询网站焦点图多少钱
  • wordpress 软件公司模板网络推广seo培训班
  • 怎么看网站哪个公司做的网站建设怎么上传数据
  • 深圳外贸英文网站设计联系电话建设网站需要多久到账
  • 客户评价 网站建设大连百度做网站推广电话
  • 如何建设正规彩票网站怎么做点击图片跳转网站
  • 做性视频网站有哪些内容[8dvd]flash网站源文件 flash整站源码
  • 天猫官方网站夸克建站系统官网
  • 网站建设和备案的顺序有没有能用的网站
  • 大庆+网站建设上海网站推广定制
  • 温州专业微网站制作公司建设网站的效果目的及其功能
  • 长沙公司制作网站费用深圳创业补贴政策2022
  • 嘉兴网站制作厂家政务网站建设规划
  • 东莞建网站公司哪个好活字格能开发企业网站吗
  • 响应式网站开发流行吗wordpress插件授权码
  • 网站建设汇报方案ppt模板电商网站开发案例
  • 山东省荣成市建设局网站做单网站
  • 做网站私活做网站大作业的心得体会
  • 在家有电脑怎么做网站上海装修公司排名前十口碑
  • 长沙网站优化培训网站建设还好做吗
  • 做调查问卷赚钱注册网站wordpress插件残留数据
  • 主做销售招聘的招聘网站有哪些网站开发的后台开发工具