Sponsored
Sponsored
Solve with full IDE support and test cases
Use these hints if you're stuck. Try solving on your own first.
Change all <code>0</code> in possible array into <code>-1</code>.
We need to find the shortest non-empty prefix of the new possible array such that the sum of elements in it is strictly larger than the remaining part.