Maximum sum of contiguous subarrays where combinations of elements have a given value (netagive also )

97 Views Asked by At

Hello I have a problem where i have eliminated to having a struct

struct profit
{
    int start, finish, profit;
};

For elements in the array this struct represents the elements from start to finish and the profit of it . (might be negative and can contain only one element )
All elements (or a subarray that contains them) must be contained in the total sum . I first tried with a modified version of Weighted interval selection but solving it this way , the solution cuts out all negative elements so it does not contain all elements . Any other known problem I can relate to ?

0

There are 0 best solutions below