COULD YOU PLEASE EXPLAIN THE QUES
DIVING ARRA PROBLEM
You just have to divide the array in 2 equal parts s.t the sum of corresponding differences of 2 halves are maximum and minimum respectively. For e.g:
Input
1
4
12 -3 10 0
Output
5 25
Explanation
For max,A={12,10}
,B={-3,0}
, max= (12-(-3))+(10-0)=25
For min,A={12,-3}
,B={10,0}
min=(12-10)+|(-3-0)|=5
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.