摘要: 1 #define MaxSize <储存数据元素的最大个数> 2 3 typedef struct SNode *Stack; 4 5 struct SNode { 6 7 ElementType Data[MaxSize]; 8 9 int Top; //栈顶的位置数组下标 10 11 } (1 阅读全文
posted @ 2020-03-19 20:32 郑NINE 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 1 typedef struct LNode *List; 2 3 struct LNode { 4 5 ElementType Data; //节点对应的数据 6 List Next; //下一个节点位置 7 }; 8 9 struct LNode L; 10 11 List PtrL; 1.求表 阅读全文
posted @ 2020-03-11 20:18 郑NINE 阅读(948) 评论(0) 推荐(0) 编辑
摘要: 1 typedef struct LNode *List 2 3 struct Lnode { 4 5 ElementType Data[MAXSIZE]; 6 7 int Last; //线性表最后一个元素 8 9 }; 10 11 struct LNode L; 12 13 List PtrL; 阅读全文
posted @ 2020-03-09 21:13 郑NINE 阅读(844) 评论(0) 推荐(0) 编辑
摘要: 函数deletelist从以head为头指针的链表中删除成绩低于min_score的学生,并返回结果链表的头指针。 1 struct stud_node *deletelist( struct stud_node *head, int min_score ) { 2 //删除成绩低于min_scor 阅读全文
posted @ 2019-12-07 13:18 郑NINE 阅读(1077) 评论(0) 推荐(0) 编辑
摘要: 1 void input() { 2 struct stud_node *q; 3 do { 4 q = (struct stud_node*)malloc(sizeof(struct stud_node)); 5 scanf("%d",&q->num); 6 if ( q->num != 0){ 阅读全文
posted @ 2019-12-07 12:34 郑NINE 阅读(2465) 评论(0) 推荐(0) 编辑
摘要: 1 #include "node.h" 2 #include <stdio.h> 3 #include <stdlib.h> 4 5 typedef struct _node { 6 int value; 7 struct _node *next; 8 } Node; 9 10 typedef st 阅读全文
posted @ 2019-12-05 23:34 郑NINE 阅读(169) 评论(0) 推荐(0) 编辑