[1,2,3,4,5]逆序为[5,4,3,2,1] 时间复杂度O(n) void reverse(int a[],int len) { int low=0; int high=len-1; while(low<high) { swap(a[low],a[high]); low++; high--; } }