• + 0 comments

    For anybody still confused, just think of the array like voltage vs. time and the intervals are a pair of commands that tell when the signal goes up/down.

    So query (p q sum) means:

    raise voltage by sum starting at time p
    
    lower voltage by sum after time q
    

    The question is then asking, what's the peak voltage?

    The auxillary array is the net change in voltage at every point in time. So we can find peak voltage by examining every point in time while summing up all of the change of voltage commands encountered thus far.