I need an algorithm to determine if an array contains two elements that sum to a given integer.
The array is sorted.
The algorithm should be recursiv
Here is the recursion method to perform the groupSum
public boolean groupSum(int start, int[] nums, int target) { if (start >= nums.length) { return (target == 0); } return groupSum(start + 1, nums, target - nums[start]) || groupSum(start + 1,nums,target) }