数据结构
果冻pudding
潜心修学
展开
-
在非递减有序的顺序表中插入一个元素x,保持顺序表有序性。
直接上代码 #include<stdio.h> #include<stdlib.h> #define LIST_INIT_SIZE 10//顺序表存储空间的初始分配量 #define LISTINCREMENT 5// 顺序存储空间的分配增量 #define OVERFLOW 0 #define ok 1 typedef struct{ int *element;//...原创 2019-10-11 10:44:57 · 4913 阅读 · 3 评论 -
顺序表元素的逆置
直接上代码 #include<stdio.h> #include<stdlib.h> #define LIST_SIZE1 10 #define LIST_SIZE2 5 #define ok 1 #define no 0 typedef struct { int *elem; int length; int listsize; }Sqlist; //初始化一个顺序...原创 2019-10-11 11:17:05 · 622 阅读 · 0 评论