以值专题

已知线性表中的元素以值递增有序排列,并以单链表做存储结构。试写一高效的算法, 删除表中所有值大于 mink 且小于 maxk 的元素

时间复杂度为:O(n) #include<iostream>#include<stdio.h>using namespace std;typedef int Element;typedef struct Node{Element data;struct Node *next;}LinkList;//初始化链表,带头节点,头插法LinkList* init_headInsert(){Li