TASK STATEMENT:
you are given an array of N integers you should find 2 sub-arrays of consecutive elements with maximum sum.sub_arrays must not overlap, sum can be negative.
INPUT:
Firts line number N number of elements, second line contains N integers which represents the array.
OUTPUT:
a single integer representing maximal sum of two sub arrays.
Im struggling with this task a lot can someone help me i would realy appreciate it.i think this is dynamic programming task but im not sure , any explanation will help.