struct _lnklist{
ElemType data;
struct _lnklist *next;
};
typedef struct _lnklist Node;
typedef struct _lnklist *LinkList;
void del_x2y(SeqList* L, ElemType x, ElemType y)
{
int i = 0, j = 0, total = 0;
for (i = 0; i <= L->last; i++) {
if (L->elem[i] > y || L->elem[i] < x) {
L->elem[j] = L->elem[i];
total++;
j++;
}
}
L->last = total - 1;
}
欢迎在评论区讨论