Plz draw the recursion tree and explain the output

#include
using namespace std;
bool subset(int*a,int n,int i,int sum,int cnt)
{
if(i==n)
{
if(sum==0 && cnt>0)
return true;
else
return false;
}
return subset(a,n,i+1,sum+a[i],cnt+1)||subset(a,n,i+1,sum,cnt);
}
int main()
{ int t;
cin>>t;
while(t–)
{
int n,a[100000];
cin>>n;
for(int i=0;i<n;i++)
{
cin>>a[i];
}
if(subset(a,n,0,0,0))
cout<<“Yes”;
else cout<<“No”;
cout<<endl;
}
return 0;
}

Every node is representing the elements contained in the recursive call.
The output is just true or false.

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.