顺序表逆置

来源:互联网 发布:python中hasattr 编辑:程序博客网 时间:2024/06/08 00:03
void Reverse(int a[], int len){    for( int i=0;i<(len+1)/2;i++)    {        int temp=a[i];        a[i]=a[len-i-1];        a[len-i-1]=temp;    }}