Maximum sum path in two sorted arrays
Given two sorted arrays of size M and N, Find a sequence of elements from both the arrays whose sum is maximum. The sequence can begin with any of the two arrays and can jump from one array to another array if there is a common element. Let us consider the following exampleArray1 = {1,…