Given an array of positive integers, find an index where the array can be split into two contiguous subarrays with equal sums. The element at the split index belongs to the left subarray, while the element immediately after starts the right subarray. If no valid split exists, return -1.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected