One of the test case is failing in this code

#include
#include
#include
#include
using namespace std;

class node{
public:
int data ;
nodeleft;
node
right;

node( int d){
    data = d;
    left = NULL;
    right = NULL;
}

};

nodetemp = NULL;
node
buildtree(){
string s;cin>>s;
if(s==“false”){
return NULL;
}
if(s==“true”){
buildtree();
}
if(s!= “true”&&s!= “false”){
noderoot = new node(stoi(s));
root->left = buildtree();
root->right = buildtree();
temp = root;
}
return temp;
}
vectorV;
bool roottoleaf(node
root, int k){
if(root == NULL){
return false;
}
int subsum = k - root->data;
if( subsum == 0){
V.push_back(root->data);
return true;
}
bool a = roottoleaf(root->left,subsum);
bool b = roottoleaf(root->right,subsum);
if(a || b){
V.push_back(root->data);
}

return a ||b;

}
int main() {
node*root = buildtree();
int k;
cin >>k;
roottoleaf(root,k);
reverse(V.begin(),V.end());
for( int i = 0; i < V.size(); i++){
cout << V[i] << " ";
}
return 0;
}

@akki56756_bab14f919dbad123 kindly share your code link by saving https://ide.codingblocks.com/ its not readable here, also few things get changed and hence alto of syntax error in big codes

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.