Subset Sum Problem : Top-Down Approach

I have used the top down approach to solve this problem, but there’s some issue and I’m not able to identify that.

I have shared my code, in the last testcase where n=47, the answer should be Yes, but I’m getting No.

Please help me find what’s wrong with my code, or share a working code : TOP DOWN only.

Thanks.

hey, can u please, close this doubt and open a new request with the right tag, this way I am unable to access the actual content of your doubt and there are multiple problems based on the similar concept so it is quite confusing
and a link to your actual content will not help, since i do not have a course of my own and that is a unique link only for the students