List Insert( List L, ElementType X ){
List p = (List)malloc(sizeof(struct Node));
p->Data = X;
if(L->Next==NULL){
L->Next = p;
return L;
}
List pre = L;
List h = pre->Next;
while(h->Data<X&&h!=NULL){
pre = h;
if(h->Next==NULL){ //插在表尾
h->Next = p;
return L;
}
h=h->Next;
}
p->Next = h;
pre->Next = p;
return L;
}