Hi recently i gave an interview for paypal and the interviewer gave a coding question on arrays where we have to find max sum of k element
constraint:
i)k<=n
ii)from left side if i consider index 1 then i need to take index 0 as well and so on similarly from right side if i am considering n-2 i need to include n-1 as well and so on. what is the optimal way of solving this.