Skip to content

Latest commit

 

History

History

widest-pair-of-indices-with-equal-range-sum

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

< 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.