# Notes - DAA HT23, Maximum segment sum

### Flashcards

### Programs

Program a worst-case $\Theta(n)$ time algorithm for finding the maximum segment sum in an array, i.e. $p$ and $q$ such that

\[\sum_{i=p}^{q-1} a[i]\]
such that this is the maximum possible.

Todo.