Tkm_algo's blog

By Tkm_algo, history, 2 years ago, In English

Hi, I can't solve this problem for 3 days now. Please help me solve this problem: Two arrays of the same length (n) are given. Need to find any segment so that the sum of the elements of the first array on this segment is equal to the sum of the elements of the second array on this segment. Need to solve in O(n).

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Not completely sure if this will work:-

Spoiler
»
2 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it
Hint1
Hint2
Explanation
Code