Input: N = 10, S = 15 A[] = {1,2,3,4,5,6,7,8,9,10} Output: 1 5 Explanation: The sum of elements from 1st position to 5th position is 15.