intBinarySearch(intarray[],intlength,intelem)//二分查找插入位置
{
intlow=0;
inthigh=length-1;
intm id=0;
while(low>1);
if(array[mid]==elem)
returnmid+1;
elseif(array[mid]>elem)
high=mid-1;
else
low=mid+1;
}
returnlow;
}
voidinsert(intL[],intlength,intelem,intcapacity)//在L相应位置插入元素x的算法
{
if(NULL==L||length