if left or right child of root is ' x ' , then add the root ' s ▁ data ▁ to ▁ ' sum '
if ( ( root -> left && root -> left -> data == x ) || ( root -> right && root -> right -> data == x ) ) sum += root -> data ;