算法描述-数据结构-严蔚敏
算法描述Status Insert_SqList(Sqlist *L,int i ,ElemType e) { int j ; if ( iL->length-1) return ERROR ; if (L->length>=MAX_SIZE) { printf(“线性表溢出!\n”); return ERROR ; } for ( j=L->length–1; j>=i-1; --j ) L->Elem_array[j+1]=L->Elem_array[j]; /* i-1位置以后的所有结点后移*/ L->Elem_array[i-1]=e; /*在i-1位置插入结点*/ L->length++ ; return OK ; }
6.17MB
文件大小:
评论区