find max overlapping series algo