Available question text
Count the number of ways to choose two split indices to partition the array into three non-empty contiguous subarrays (left, mid, right) such that sum(left) ≤ sum(mid) ≤ sum(right). Because nums are non-negative, prefix sums are non-decreasing, so you can use two pointers or binary searches on prefix sums to count valid mid-split ranges for each left split (answer mod 1e9+7).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1712. Ways to Split Array Into Three Subarrays
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source