Basically I have two arrays. They are sorted. I have managed to compare them with efficiency. Now I require to find the sum of two values of arrays and compare them. For example
arr1 = [5,8,10] // sum of first two is 13
arr2 = [6,7,12] // sum of first two is also 13
if that happens, do something. I can't think of a way to do that. Any help will highly be appreciated.