Why giving the wrong answer for the two test cases there

#include
using namespace std;
int check =0;

void check_subseq(int input[],int output[],int i,int j,int len){

if(i==len){
	int sum =0;
	
	for(int t =0;t<=j;t++){
		sum = sum + output[t];
	}
	if(sum==0){
		check++;
	}
	
	return;		
}


output[j]=input[i];

check_subseq(input,output,i+1,j+1,len);
check_subseq(input,output,i+1,j,len);

}
int main() {
int test;
cin>>test;
while(test–){
int len;
cin>>len;

	int arr[100000];
	int brr[100000];
	for(int i=0;i<len;i++){
		cin>>arr[i];
	}
	//len would become an important 
	check_subseq(arr,brr,0,0,len);
	if(check){
		cout<<"Yes";
	}
	else{
		cout<<"No";
	}
	check = 0;
	cout<<endl;
	

}

}

Hey @saurabh66
Please share ur code in IDE

Hey @saurabh66
Did 2 changes in ur code and mentioned the changes in comments : https://ide.codingblocks.com/s/354264 :slight_smile:
If this resolves ur query then please mark it as resolved :slight_smile: