Example:
Input:
A1[] = 1 2 7 11 14 25
A2[] = 1 4 7 9 12 25 30
Output : The largest possible sum = 92
Idea: We will maintain three variables path1, path2 and pathsum. At any instant, path1 is the maximum sum of data we walked over till now, being on sequence 1. path2 is the maximum amount of data we walked over till now, being on sequence 2. The final result is stored in variable pathsum by which is the maximum of path1 and path2.
C++ program to find maxsum of double helix
Output
need an explanation for this answer? contact us directly to get an explanation for this answer