Finding sum for given number


yhis was the question for the finding pairs to the given sum and have to find the all pairs.why i was getting an run time error.and is there wrong in my recursion.
in the code i was tried to exclude the item which gives the total less than sum

Hello @Chandra123,

Is this target sum pair?
Which question is this?
Can you name the problem.

Hello @Chandra123,

  1. You are not backtracking
    You are making the same recursive call twice.

  2. Where are you keeping track of the pair?

Hey @Chandra123,

Again, in your recursive code you are not keeping record of pairs.

I have modified your code:

Hope, this would help.
Give a like if you are satisfied.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.