Sum it up problem

Link to my code , what is the error with the approack i am trying to implement , please tell the required changes .

Hi,

In if(arr[si[<=t) condition in your code it is not necessary that you will always take that number. You can skip that number and can take further elements in the array.
Now, try to solve the problem.

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.