1712. Ways to Split Array Into Three Subarrays

Can you please explain this problem how I will approach this problem.

hi @bansalrahul409_90a31cb29d673b6d,
you need to find the no of ways to divide array in 3 parts
for this start iterating from start it will be left array (till i)
now on the right side (after i) in this part do a binary search to find the partition where array on right is having value more than array on left of that part and this left array should be having more sum than array on the left of i
now if you got any such partition try to maximise the right part and finally when you get the point where right part is maximum using binary search that from i+1 to that point all subarray will be in the ans