If I have all the element present negative like -1,-2,-3,-4
then answer would be -1 but your code is returning as 0 .Please help me.
Kadnaes algorithm
take the max_sum = INT_MIN
because INT_MIN is a very small number
If I have all the element present negative like -1,-2,-3,-4
then answer would be -1 but your code is returning as 0 .Please help me.
take the max_sum = INT_MIN
because INT_MIN is a very small number