Recursively check if required sum can be obtained by adding current element or by subtracting the current index element
return ( dfs ( nums , S , curr_sum + nums [ index ] , index + 1 ) + dfs ( nums , S , curr_sum - nums [ index ] , index + 1 ) ) ; NEW_LINE