Subset sum easy


why this code is producing wrong output

Hi @dakshi
here is d updated code.


instead of using if else in i==n condition,
use if else-if
otherwise ur code will always exit since in starting i!=n and go into else condition and return.
Hope dis helps.