Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
There is no way if the sum (number of '1's) is not divisible by the number of splits. So sum%3 should be 0.
Preffix s1 , and suffix s3 should have sum/3 characters '1'.
Follow up: Can you generalize the problem with numbers between [-10^9, 10^9] such the sum between subarrays s1, s2, s3 are the same?