Given an array A consisting of n integers , we define beauty of the array as maximum sum of some contiguous elements with performing atmost one operation which is , you can multiply any subarray with ‘x’ but only once.
N=5,x=-2
A=[-3,8,-2,1,-6]
ans:- 22
sir / mam , couldnt even approach the question ., it is given in the quiz