You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hint 1
Keep prefix sums of both arrays.
Hint 2
Can the difference between the prefix sums at an index help us?
Hint 3
What happens if the difference between the two prefix sums at an index a is x, and x again at a different index b?
Hint 4
This means that the sum of nums1 from index a + 1 to index b is equal to the sum of nums2 from index a + 1 to index b.