文件名称:3-7
介绍说明--下载内容均来自于网络,请自行研究使用
实现下面的数组元素交换位置函数:void swap(int a[], int m, int n)
该函数能够把数组a的前m个元素与后n个元素交换位置,即,
交换前:a1,a2,...,aM, aM+1,aM+2,...,aM+N
交换后:aM+1,aM+2,...,aM+N, a1,a2,...,aM
(要求:除数组a外,不得引入其它数组。)- implement the following array element exchange position function: void swap (int a [], int m, int n) This function can be put n elements of the array a before and after the m-th element exchange position, that is, before the exchange: a1, a2, ..., aM, aM+1, aM+2, ..., after aM+N exchange: aM+1, aM+2, ..., aM+N, a1, a2, ..., aM (requirements: In addition to the array a, shall not introduce other array.)
该函数能够把数组a的前m个元素与后n个元素交换位置,即,
交换前:a1,a2,...,aM, aM+1,aM+2,...,aM+N
交换后:aM+1,aM+2,...,aM+N, a1,a2,...,aM
(要求:除数组a外,不得引入其它数组。)- implement the following array element exchange position function: void swap (int a [], int m, int n) This function can be put n elements of the array a before and after the m-th element exchange position, that is, before the exchange: a1, a2, ..., aM, aM+1, aM+2, ..., after aM+N exchange: aM+1, aM+2, ..., aM+N, a1, a2, ..., aM (requirements: In addition to the array a, shall not introduce other array.)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
3-7.cpp