Let S = (s1, s2, . . . , sn) be a given sequence of integer
numbers. The numbers can be positive or negative. We define a slice
of S as a sub- sequence (si,si+1,...,sj) where 1 ≤ i < j ≤ n.
The weight of a slice is defined as the sum of its elements.
Provide efficient algorithms to answer each of the following
questions:
a)Is there any slice with zero weight ?
b)Find the maximum weight slice in...