上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 44 下一页
摘要: 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 <tit 阅读全文
posted @ 2020-03-13 00:40 shanlu 阅读(1057) 评论(0) 推荐(0) 编辑
摘要: 1,在页面中导入JS <script src="../js/react.development.js"></script> <script src="../js/react-dom.development.js"></script> <script src="../js/babel.min.js"> 阅读全文
posted @ 2020-03-13 00:16 shanlu 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 这里先删除第2个结点,测试 deleNode 函数 1 /*把第i个结点从链表中删除*/ 2 3 4 #include<stdio.h> 5 #include<stdlib.h> 6 7 //链表中节点的结构 8 typedef struct Link { 9 int data; 10 struct 阅读全文
posted @ 2020-03-11 00:44 shanlu 阅读(612) 评论(0) 推荐(0) 编辑
摘要: 这里是在第三个结点之前插入一个值 1 /*在特定(第三个结点)结点之前插入元素*/ 2 3 4 #include<stdio.h> 5 #include<stdlib.h> 6 7 //链表中节点的结构 8 typedef struct Link { 9 int data; 10 struct Li 阅读全文
posted @ 2020-03-11 00:34 shanlu 阅读(328) 评论(0) 推荐(0) 编辑
摘要: /*求表长*/ #include<stdio.h> #include<stdlib.h> //链表中节点的结构 typedef struct Link { int data; struct Link* next; }link; //链表初始化 link* initLink(link* phead) 阅读全文
posted @ 2020-03-10 23:53 shanlu 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 1,首先将链表初始值改为用户的输入 2,根据用户的输入,打印出初始化后的链表 3,用户继续输入希望寻找的值 4,根据这个值在链表中寻找数据域是这个值的结点,并计数,最后返回满足条件的结点个数 1 /*返回特定数据域值的结点个数*/ 2 3 #include<stdio.h> 4 #include<s 阅读全文
posted @ 2020-03-10 23:48 shanlu 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 根据用户输入的号码,找到这个号码对应的值 1 /*按号定位*/ 2 3 #include<stdio.h> 4 #include<stdlib.h> 5 6 //链表中节点的结构 7 typedef struct Link { 8 int data; 9 struct Link* next; 10 阅读全文
posted @ 2020-03-10 23:30 shanlu 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 根据用户输入的元素,查找这个元素在链表中是第几个 1 /*按值定位*/ 2 3 #include<stdio.h> 4 #include<stdlib.h> 5 6 //链表中节点的结构 7 typedef struct Link { 8 int data; 9 struct Link* next; 阅读全文
posted @ 2020-03-10 22:53 shanlu 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1,创建尾指针的方式,让尾指针不断往前移动 1 /*头插入创建单链表*/ 2 3 #include<stdio.h> 4 #include<stdlib.h> 5 6 typedef struct Link { 7 int data; 8 struct Link* next; 9 }link; 10 阅读全文
posted @ 2020-03-10 22:19 shanlu 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 1,使用头指针的方式,不创建头结点 1 /*尾插入实现方法2*/ 2 #include<stdio.h> 3 #include<stdlib.h> 4 5 //链表中节点的结构 6 typedef struct Link { 7 int data; 8 struct Link* next; 9 }l 阅读全文
posted @ 2020-03-10 18:26 shanlu 阅读(182) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 44 下一页