For this Question: Given an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to a given number S.Each test case consists of two lines. The first line of each test case is N and S, where N is the size of the array and S is the sum. The second line of each test case contains N space-separated integers denoting the array elements.

<b>Constraints:-</b>
1 &le; N &le; 10<sup>5</sup>
1 &le; Ai &le; 10<sup>5</sup>Print the starting and ending positions (1 indexing) of first such occurring subarray from the left if sum equals to subarray, else print -1.Sample Input
5 12
1 2 3 7 5

Sample Output
2 4

Explanation:
subarray starting from index 2 and ending at index 4 => {2 , 3 , 7} 
sum = 2 + 3 + 7 = 12

Sample Input
10 15
1 2 3 4 5 6 7 8 9 10

Sample Output
1 5, I have written this Solution Code: def sumFinder(N,S,a):
    currentSum = a[0]
    start = 0
    i = 1
    while i <= N:
        while currentSum > S and start < i-1:
            currentSum = currentSum - a[start]
            start += 1
        if currentSum == S:
            return (start+1,i)
        if i < N:
            currentSum = currentSum + a[i]
        i += 1
    return(-1)

N, S = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
ans = sumFinder(N,S,a)
if(ans==-1):
    print(ans)
else:
    print(ans[0],ans[1]), In this Programming Language: Python, Now tell me if this Code is compilable or not?