Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.38 KB

File metadata and controls

35 lines (27 loc) · 1.38 KB

< Previous                  Next >

Hints

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.