Driver program to run the case
int main ( ) { struct Node * root = newnode ( 8 ) ; root -> left = newnode ( 5 ) ; root -> right = newnode ( 4 ) ; root -> left -> left = newnode ( 9 ) ; root -> left -> right = newnode ( 7 ) ; root -> left -> right -> left = newnode ( 1 ) ; root -> left -> right -> right = newnode ( 12 ) ; root -> left -> right -> right -> right = newnode ( 2 ) ; root -> right -> right = newnode ( 11 ) ; root -> right -> right -> left = newnode ( 3 ) ; isPathSum ( root ) ? cout << " Yes " : cout << " No " ; return 0 ; }