Check if all elements of given Linked List corresponds to a downward path from any node in given Binary Tree

  #include “bits/stdc++.h”using namespace std;  struct listNode {    int val;    struct listNode* next;          listNode(int data)    {        this->val = data;        next = NULL;    }};  struct treeNode {    int val;    treeNode* right;    treeNode* left;          treeNode(int data)    {        this->val = data;        this->left = NULL;        this->right = NULL;    }};  bool isPathUtil(listNode* curList,                treeNode* curTree){            if (curList == NULL)        return true;          if (curTree == NULL)        return false;      if (curList->val == curTree->val) {                          return isPathUtil(curList->next,                          curTree->left)               || isPathUtil(curList->next,                             curTree->right);    }    else {                  return false;    }}  bool isPath(listNode* head, treeNode* root){              if (root == NULL)        return false;              if (head == NULL)        return true;              bool isPossible = false;      if (root->val == head->val) {                                  isPossible = isPathUtil(                         head->next, root->left)                     || isPathUtil(                            head->next, root->right);    }              return isPossible || isPath(head, root->left)           || isPath(head, root->right);}  int main(){    treeNode* root = new treeNode(1);    root->left = new treeNode(2);    root->right = new treeNode(3);    root->left->left = new treeNode(4);    root->left->right = new treeNode(5);    root->left->right->left = new treeNode(7);    root->right->right = new treeNode(6);    root->right->right->left = new treeNode(8);    root->right->right->right = new treeNode(9);      listNode* head = new listNode(3);    head->next = new listNode(6);    head->next->next = new listNode(8);          cout