**Objective: **Given an array (non-negative) and an integer, Find the Subarray whose sum is equal to the given integer.

**Examples**:

int[] arrA = { 25, 12, 14, 22, 19, 15, 10, 23 }; Integer = 55Output: 55 is found between indexes 2 and 4 And Elements are : 14 22 19

**Approach : **

**Naive Approach: **Use 2 loops . Time Complexity – O(n^{2}).

**Better Approach: Time Complexity – O(n)**