A robot arm consisting of a sequence of rigid line segments L1, L2, . . . , Ln hinged together consecutively
The $s$'s tell you which way each segment of the arm is pointing: $s_i=+1$ if the $i$th segment points up and $s_i=-1$ if the $i$th segment points down.

This means that $S_j := \sum_{i=0}^j s_i\ell_i$ is the distance of the end of the $i$th segment from the pivot. So $\min_j S_j$ and $\max_j S_j$ are the height of the lowest and highest points of the arm when it's folded in the way that $s_0, \dots, s_n$ describe.