设顺序表VA中的数据元素递增有序.试写一算法.将X插到顺序表的适当位置上,以保持该表的有序性.

问题描述:

设顺序表VA中的数据元素递增有序.试写一算法.将X插到顺序表的适当位置上,以保持该表的有序性.

# include
struct record{
int key;};
typedef struct record RECORD;
void insertsort(RECORD num[],int n)
{
int i,j;
for(i=0; i