While reading through the “Greedy Algorithm” section of chapter 20 I saw that after the diagram for the greatest sum being 6, this one:
greatest sum = 6
[3, -4, 4, -3, 5, -9]
|-----|
6
The next sentence says, “Finally, we reach the -9. This would make the current sum -4.”
Shouldn’t the current sum actually be -3 (e.g. 4 + -3 + 5 + -9 = -3)?