Dsa
Arrays
Medium
Balanced Array Split
Given an array of integers, split it into two parts such that the sum of the elements in both parts is equal. Return the indices where the array can be split. The input consists of a single line with integers separated by spaces. If no such split is possible, print 'No valid split'.
Example Input:
1 2 3 4 5 5
Example Output:
3
Key concepts
arraysprefix_sumbalance
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now