please my apparaoch is similiar to knapsack 0/1
Help me out in this problem
its working.
it will have . if u dont check it first then for the case where last element is part of ur answer then it will return false

u were again delcaring fs inside main,remove it.
sorry bro i cant.
you can ask ur doubt using ask doubt feature if i will be availabe then will try to help u
it will .
check for this case->
2
1 5
6
u will get false but it should be true (reason after including 5(last element) ur index will become(increment by 1) 2 and because index==n u will return false)
bro i think u have reopend the doubt, now some other ta is taking this doubt ,pls wait for his response.
or ask another doubt
