Given an Array, find the maximum difference between the sum of elements in odd indices and even indices. To achieve this you can delete any number of elements from the array,after deleting the elements,the array will be re-numbered.↵
↵
Example : 1 4 8 2 6↵
↵
Upon deleting 1,2.↵
↵
New array 8 2 6↵
↵
Answer is 8+6-2 = 12.↵
↵
Constraints : 1<=N<=1e5↵
↵
Can anyone please help me solve this problem?↵
↵
Example : 1 4 8 2 6↵
↵
Upon deleting 1,2.↵
↵
New array 8 2 6↵
↵
Answer is 8+6-2 = 12.↵
↵
Constraints : 1<=N<=1e5↵
↵
Can anyone please help me solve this problem?↵