文件名称:Datastruct_C 实现顺序表的就地逆置
介绍说明--下载内容来自于网络,使用问题请自行百度
Descr iption
试写一算法,实现顺序表的就地逆置,即利用原表的存储空间将线性表(a1,a2,…..an),逆置为( an,an-1, …….a2,a1)。
Input
输入长度n
接下来是n个数
Output
操作后的序列。
Sample Input
7
2 4 1 7 5 3 6
Sample Output
6 3 5 7 1 4 2
-Descr iption try to write an algorithm to achieve the reverse order of the table place setting, namely the use of the original table storage space will be a linear form (a1, a2, ... .. an), the inverse set of (an, an-1, ... .... a2, a1). Input The input length n followed by n number of Output operation sequence. Sample Input 7 2 4 1 7 5 3 6 Sample Output 6 3 5 7 1 4 2
试写一算法,实现顺序表的就地逆置,即利用原表的存储空间将线性表(a1,a2,…..an),逆置为( an,an-1, …….a2,a1)。
Input
输入长度n
接下来是n个数
Output
操作后的序列。
Sample Input
7
2 4 1 7 5 3 6
Sample Output
6 3 5 7 1 4 2
-Descr iption try to write an algorithm to achieve the reverse order of the table place setting, namely the use of the original table storage space will be a linear form (a1, a2, ... .. an), the inverse set of (an, an-1, ... .... a2, a1). Input The input length n followed by n number of Output operation sequence. Sample Input 7 2 4 1 7 5 3 6 Sample Output 6 3 5 7 1 4 2
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Datastruct_C.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.