Now, as an exercise, I will live the following find an algorithm for computing the highest sum of a segment of consecutive components of an array of integers. And please, find a linear solution to this exercise. I think this is a very interesting example, if you succeed in trying to extract a proof of this fact, that is that every array has a segment of maximal sum, if you extract an algorithm from this proof, you will I think grasp this kind of methodology. | ![]() |