public void nizhi()//链表的逆置
{
Node T1,T2=head;//head是定义的头结点.
T2=head.Next;
head.Next=null;
while(T2!=null)
{
T1=T2.Next;
T2.Next=head.Next;
head.Next=T2;
T2=T1;
}
}
public int RemoveMin()
{
Node dpm,dm,pm,m;// dpm是所要删除的前一个,dm是所需要删除的值. m是当前最小值 . pm是当前最小值的前一个.
dpm=pm=head;
dm=m=head.Next;
while(m!=null)
{
if (dm.data>m.data)
{ dm=m;
dpm=pm;
}
m=m.Next;
pm =pm.Next;
}
dpm.Next=dpm.Next.Next;
dm.Next =null;
return dm.data;
}