I saw a problem and wanted to know that the community thought about it:
Given two unsorted arrays, swap values from the second array into the first (stable) in order to find the maximum contiguous sum of the first array.
Eg. {3,1,4,5,6} and {9,1,2,5,3} ===> {9,5,4,5,6} and {3,1,2,5,1}
I can’t find a better solution than sorting and choosing the largest elements. Any thoughts?