https://ide.codingblocks.com/s/67465
Can you please tell where am I going wrong?
@amartya970914 you code is not work for 1 8 -1 40 -14 7 6 5 -4 -1 output is 52 but your program gives output as 82 so check you logic