https://codeforces.com/problemset/problem/1519/D
Why in this example its always reversing from the middle of one of the arrays.whtas the logic behind it???
https://codeforces.com/problemset/problem/1519/D
Why in this example its always reversing from the middle of one of the arrays.whtas the logic behind it???
@Somasree you can reverse any subarray of array a there is no condition on its staring and ending point you just need to maximize the desired result by revesing any subarray
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.
In this problem
editoril solution -https://ide.codingblocks.com/s/585658
I didnot undertood
line no 22 and 28
please help
@Somasree they are maximising the answer for reversing every segement in l to r and then you have 3 segments of your answer