Sequence of given sum in array

Sequence of given sum in array