资 源 简 介
实习题
[问题描述]
1. 设顺序表中的数据元素递增有序,将插入到顺序表的适当位置上,是该表仍然有序。
[输入]
初始顺序表,插入字符。
[输出]
插入x后线性表的结果
[存储结构]
采用顺序存储结构
[算法的基本思想]
建立一个递增顺序表,插入一个数值并移动元素,使其仍然有序。
程序如下:
#include "iostream.h"
#include
#define LIST_INTI_SIZE 100//初始空间大小
typedef struct SqList
-attachment that [problem description] 1. Established order of the table data elements incremental orderly, will be inserted into the appropriate sequence table position is that the schedule remains orderly. [Imported] initial order and inserting characters. [Output] x inserted after the results of the linear scale [storage structure] sequence storage structure [algorithm for the basic idea : the establishment of a- incremental sequence table, insert a numerical and mobile elements, it remains orderly. The procedure is as follows :# include "iostream.h"# include