Given with two arrays A and B, each of size N where the elements of array contains either 1 or 0 we have to find such an interval (p,q)(inclusive) such that the sum of all the elements of A in this interval and sum of all elements of B in this interval is equal.
No comments:
Post a Comment