public void reverseArray(int[] arr) {
int len = arr.length;
int left = 0, right = len - 1 - left;
while (left < right) {
swap(arr, left, right);
left++;
right--;
}
}
private void swap(int[] arr, int left, int right) {
int tmp = =arr[left];
arr[left] = arr[right];
arr[right] = tmp;
}