there is run error in the first 2 cases and right answer in last two cases. please check the code: https://ide.codingblocks.com/s/190049
Maximum subarray sum - divide and conquer
Hey @Vishal123
There is only one test case for this problem. Can you please send the question link so that I can verify the number of test cases is 4 only.
The issue seems to be your segment tree size. Try to set it to 400005.