标签:
int j,h,i=0;
for( j=0;j<length&&i<length2;++j)
{
if(b[i]<data[j])
{ for(h=length;h!=j;--h)
data[h]=data[h-1];
data[j]=b[i];
++length; ++i; }
else if(j==length-1&&b[i]>data[length-1])
{ data[length]=b[i];
length++; ++i; } } }
void SeqList::PrintList()
{for(int i=0;i<length;i++)
cout<<data[i]<<" "; cout<<endl; }
void main()
标签:
原文地址:http://www.cnblogs.com/tinaluo/p/5246472.html