freq) //找到*q结点,使q->freq>>=p->freq q=q->prior; p->prior->next:p->next; //先删除*p结点 if(p->next! =NULL) p->next->prior=p->prior; p->next=q->next; //将*p结点插入到*q结点之后 if(q->next! =NULL) q->next->prior=p; q->next:=p; p->prior:q; } return 1; } }