I am not able to pass the test cases
how to solve this problem
Dividing array problem
int j = n - 1;
for (int i = 0; i < N; i++) {
maxans += abs(arr[i] - arr[j--]);
}
and use long long
I am not able to pass the test cases
how to solve this problem
int j = n - 1;
for (int i = 0; i < N; i++) {
maxans += abs(arr[i] - arr[j--]);
}
and use long long