Open JangoBoogaloo opened 3 months ago
First, we know this formular
prefix[left_end] <= prefix[mid_end] - prefix[left_end] <= prefix[right_end] - prefix[mid_end]
For each left_end
we calculate mid_end
Then we need a formular for mid_end
, lower_bound
<= mid_end
<= upper_bound
1712. Ways to Split Array Into Three Subarrays