Example in problem description wrong


#1

A = 4
B = [0, 1, -1, 0]
output=1
this example is wrong as
[0],[1,-1],[0]
[0,1,-1],[0]
[0][1,-1,0]
therefore ans should be 3 and not 1


#2

read the problem carefully, we need to divide the array into 3 contiguous subarrays and not 2