This is my code can anyone tell me what i am doing wrong here plus how can i sort the array in this particular question
Arrays-Target Sum Path
hi @akshat42bajpai
u can use inbuild sort function to sort the array elements like this
sort(arr, arr+n);
I have corrected ur code…
what if i don’t use pointer here in the parameter?? will the code still work?
hi @akshat42bajpai
u can also write it like this
void targetSum(int arr[], int n, int target)
i hope it clears all ur doubt
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.